﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using CMISLibrary;
using BCNPCObject.EXCEL;
using BCNPCObject.DB;
using System.Data.OracleClient;
using System.Windows;
using System.Windows.Forms;
namespace bus_TienichNPC
{
    public class cls_ImportExcel_bus
    {
        #region   Atributes
        private cls_DV_YCAU_KNAI_Controller obj_DV_YCAU_KNAI_Controller;
        private cls_HDG_HOP_DONG_Controller obj_HDG_HOP_DONG_Controller;
        private cls_HDG_KHACH_HANG_Controller obj_HDG_KHACH_HANG_Controller;
        private cls_HDG_DIEM_DO_Controller obj_HDG_DIEM_DO_Controller;
        private cls_HDG_DDO_SOGCS_Controller obj_HDG_DDO_SOGCS_Controller;
        private cls_HDG_HO_NGHEO_Controller obj_HDG_HO_NGHEO_Controller;
        private cls_HDG_KHANG_LIENHE_Controller obj_HDG_KHANG_LIENHE_Controller;
        private cls_HDG_PTHUC_TTOAN_Controller obj_HDG_PTHUC_TTOAN_Controller;
        private cls_HDG_VITRI_DDO_Controller obj_HDG_VITRI_DDO_Controller;
        private cls_DD_BBAN_BDONG_Controller obj_DD_BBAN_BDONG_Controller;
        private cls_DD_BCS_CTO_Controller obj_DD_BCS_CTO_Controller;
        private cls_DD_BDONG_CTO_Controller obj_DD_BDONG_CTO_Controller;
        private cls_DD_BDONG_HTAI_Controller obj_DD_BDONG_HTAI_Controller;
        private cls_GCS_CHISO_Controller obj_GCS_CHISO_Controller;
        private cls_HDG_BBAN_APGIA_Controller obj_HDG_BBAN_APGIA_Controller;
        private cls_HDG_PHU_LUC_HD_Controller obj_HDG_PHU_LUC_HD_Controller;
        private cls_DD_BDONG_TTHAO_Controller obj_DD_BDONG_TTHAO_Controller;
        private cls_D_TNGAN_VIEN_Controller obj_D_TNGAN_VIEN_Controller;
        private cls_CN_BB_GTHU_Controller obj_CN_BB_GTHU_Controller;
        private cls_CN_HDON_GTHU_Controller obj_CN_HDON_GTHU_Controller;
        private cls_NPC_CHAMNO_OFFLINE_Controller obj_NPC_CHAMNO_OFFLINE_Controller;
        private cls_NPC_CHAMNO_OFFLINE_LOG_Controller obj_NPC_CHAMNO_OFFLINE_LOG_Controller;
        private cls_CN_PHIEU_THU_Controller obj_CN_PHIEU_THU_Controller;
        private cls_CN_HDON_PHTHU_Controller obj_CN_HDON_PHTHU_Controller;
        //private BCNPCObject.cls_CN_THEODOINO_Controller obj_CN_THEODOINO_Controller;
       // private BCNPCObject.cls_NPC_BCKD07_Controller obj_NPC_BCKD07_Controller;

        # endregion

        #region   Constructor

        public cls_ImportExcel_bus()
        {
            obj_DV_YCAU_KNAI_Controller = new cls_DV_YCAU_KNAI_Controller();
            obj_HDG_HOP_DONG_Controller = new cls_HDG_HOP_DONG_Controller() ;
            obj_HDG_KHACH_HANG_Controller = new cls_HDG_KHACH_HANG_Controller();
            obj_HDG_DIEM_DO_Controller = new cls_HDG_DIEM_DO_Controller();
            obj_HDG_DDO_SOGCS_Controller =new cls_HDG_DDO_SOGCS_Controller();
            obj_HDG_HO_NGHEO_Controller = new cls_HDG_HO_NGHEO_Controller();
            obj_HDG_KHANG_LIENHE_Controller =new cls_HDG_KHANG_LIENHE_Controller();
            obj_HDG_PTHUC_TTOAN_Controller = new cls_HDG_PTHUC_TTOAN_Controller();
            obj_HDG_VITRI_DDO_Controller = new cls_HDG_VITRI_DDO_Controller();
            obj_DD_BBAN_BDONG_Controller = new cls_DD_BBAN_BDONG_Controller();
            obj_DD_BCS_CTO_Controller = new cls_DD_BCS_CTO_Controller();
            obj_DD_BDONG_CTO_Controller = new cls_DD_BDONG_CTO_Controller();
            obj_DD_BDONG_HTAI_Controller = new cls_DD_BDONG_HTAI_Controller();
            obj_GCS_CHISO_Controller = new cls_GCS_CHISO_Controller();
            obj_HDG_BBAN_APGIA_Controller = new cls_HDG_BBAN_APGIA_Controller();
            obj_HDG_PHU_LUC_HD_Controller = new cls_HDG_PHU_LUC_HD_Controller();
            obj_DD_BDONG_TTHAO_Controller = new cls_DD_BDONG_TTHAO_Controller();
            obj_D_TNGAN_VIEN_Controller = new cls_D_TNGAN_VIEN_Controller();
            obj_CN_BB_GTHU_Controller =new cls_CN_BB_GTHU_Controller();
            obj_CN_HDON_GTHU_Controller = new cls_CN_HDON_GTHU_Controller();
            obj_NPC_CHAMNO_OFFLINE_Controller = new cls_NPC_CHAMNO_OFFLINE_Controller();
            obj_NPC_CHAMNO_OFFLINE_LOG_Controller = new cls_NPC_CHAMNO_OFFLINE_LOG_Controller();
            obj_CN_PHIEU_THU_Controller = new cls_CN_PHIEU_THU_Controller();
            obj_CN_HDON_PHTHU_Controller =new cls_CN_HDON_PHTHU_Controller();
            //obj_CN_THEODOINO_Controller =new cls_CN_THEODOINO_Controller();
            //obj_NPC_BCKD07_Controller = new cls_NPC_BCKD07_Controller();
        }
        #endregion
        
        # region Mapinfo
        public void mapEntityToInfoDV_YCAU_KNAI(DataSet Entity)
        {
            if (this.obj_DV_YCAU_KNAI_Controller == null)
            {
                this.obj_DV_YCAU_KNAI_Controller = new cls_DV_YCAU_KNAI_Controller();
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["MA_YCAU_KNAI"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.MA_YCAU_KNAI = Convert.ToInt64(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["MA_YCAU_KNAI"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["SO_PHIEU_YCAU"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.SO_PHIEU_YCAU = Convert.ToInt16(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["SO_PHIEU_YCAU"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["ID_VITRI_HSO"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.ID_VITRI_HSO = Convert.ToInt64(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["ID_VITRI_HSO"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["MA_KHANG_YCAU"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.MA_KHANG_YCAU = Convert.ToString(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["MA_KHANG_YCAU"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["MA_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.MA_KHANG = Convert.ToString(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["MA_KHANG"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["TEN_NGUOIYCAU"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.TEN_NGUOIYCAU = Convert.ToString(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["TEN_NGUOIYCAU"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["DCHI_NGUOIYCAU"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.DCHI_NGUOIYCAU = Convert.ToString(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["DCHI_NGUOIYCAU"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["NGAY_TNHAN"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.NGAY_TNHAN = Convert.ToDateTime(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["NGAY_TNHAN"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["NOI_DUNG_YCAU"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.NOI_DUNG_YCAU = Convert.ToString(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["NOI_DUNG_YCAU"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["NGAY_HTHANH"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.NGAY_HTHANH = Convert.ToDateTime(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["NGAY_HTHANH"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["MA_TCHAT"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.MA_TCHAT = Convert.ToString(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["MA_TCHAT"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["MA_HTHUC"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.MA_HTHUC = Convert.ToString(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["MA_HTHUC"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["MA_LOAI_YCAU"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.MA_LOAI_YCAU = Convert.ToString(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["MA_LOAI_YCAU"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["TINH_TRANG"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.TINH_TRANG = Convert.ToInt16(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["TINH_TRANG"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["DTHOAI"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.DTHOAI = Convert.ToString(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["DTHOAI"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["MA_CNANG"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.MA_CNANG = Convert.ToString(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["MA_CNANG"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["DV_YCAU_KNAI"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_DV_YCAU_KNAI_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["DV_YCAU_KNAI"].Rows[0]["NGUOI_SUA"].ToString());
            }
        }
        public void mapEntityToInfoHDG_HOP_DONG(DataSet Entity)
        {
            if (this.obj_HDG_HOP_DONG_Controller == null)
            {
                this.obj_HDG_HOP_DONG_Controller = new cls_HDG_HOP_DONG_Controller();
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["ID_HDONG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.ID_HDONG = Convert.ToInt64(Entity.Tables["HDG_HOP_DONG"].Rows[0]["ID_HDONG"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["MA_HDONG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.MA_HDONG = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["MA_HDONG"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["MA_YCAU_KNAI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.MA_YCAU_KNAI = Entity.Tables["HDG_HOP_DONG"].Rows[0]["MA_YCAU_KNAI"].ToString();
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["MA_LOAIHD"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.MA_LOAIHD = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["MA_LOAIHD"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["NGAYKY_HDONG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.NGAYKY_HDONG = Convert.ToDateTime(Entity.Tables["HDG_HOP_DONG"].Rows[0]["NGAYKY_HDONG"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["NGAY_HLUC"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.NGAY_HLUC = Convert.ToDateTime(Entity.Tables["HDG_HOP_DONG"].Rows[0]["NGAY_HLUC"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["TRANG_THAI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.TRANG_THAI = Convert.ToInt16(Entity.Tables["HDG_HOP_DONG"].Rows[0]["TRANG_THAI"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["HLUC_TUNGAY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.HLUC_TUNGAY = Convert.ToDateTime(Entity.Tables["HDG_HOP_DONG"].Rows[0]["HLUC_TUNGAY"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["HLUC_DENNGAY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.HLUC_DENNGAY = Convert.ToDateTime(Entity.Tables["HDG_HOP_DONG"].Rows[0]["HLUC_DENNGAY"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["MA_LDO_TLY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.MA_LDO_TLY = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["MA_LDO_TLY"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["THANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.THANG = Convert.ToInt16(Entity.Tables["HDG_HOP_DONG"].Rows[0]["THANG"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["NAM"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.NAM = Convert.ToInt16(Entity.Tables["HDG_HOP_DONG"].Rows[0]["NAM"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["SONAM_HLUC"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.SONAM_HLUC = Convert.ToInt16(Entity.Tables["HDG_HOP_DONG"].Rows[0]["SONAM_HLUC"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["STIEN_DCOC"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.STIEN_DCOC = Convert.ToInt16(Entity.Tables["HDG_HOP_DONG"].Rows[0]["STIEN_DCOC"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["KWH_TDUONG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.KWH_TDUONG = Convert.ToInt16(Entity.Tables["HDG_HOP_DONG"].Rows[0]["KWH_TDUONG"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["TGIAN_TDUONG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.TGIAN_TDUONG = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["TGIAN_TDUONG"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["LOAI_TIEN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.LOAI_TIEN = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["LOAI_TIEN"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["DIEN_AP"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.DIEN_AP = Convert.ToInt16(Entity.Tables["HDG_HOP_DONG"].Rows[0]["DIEN_AP"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["TBAO_SUCO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.TBAO_SUCO = Convert.ToInt16(Entity.Tables["HDG_HOP_DONG"].Rows[0]["TBAO_SUCO"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["DAP_DDONG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.DAP_DDONG = Convert.ToInt16(Entity.Tables["HDG_HOP_DONG"].Rows[0]["DAP_DDONG"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["TAN_SO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.TAN_SO = Convert.ToDecimal(Entity.Tables["HDG_HOP_DONG"].Rows[0]["TAN_SO"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["TANSO_SAISO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.TANSO_SAISO = Convert.ToDecimal(Entity.Tables["HDG_HOP_DONG"].Rows[0]["TANSO_SAISO"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["NGAY_GCS"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.NGAY_GCS = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["NGAY_GCS"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["SOLAN_TTOAN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.SOLAN_TTOAN = Convert.ToInt16(Entity.Tables["HDG_HOP_DONG"].Rows[0]["SOLAN_TTOAN"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["THOIHAN_TTOAN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.THOIHAN_TTOAN = Convert.ToInt16(Entity.Tables["HDG_HOP_DONG"].Rows[0]["THOIHAN_TTOAN"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["SNAM_GHAN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.SNAM_GHAN = Convert.ToInt16(Entity.Tables["HDG_HOP_DONG"].Rows[0]["SNAM_GHAN"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["DCHI_TTOAN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.DCHI_TTOAN = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["DCHI_TTOAN"].ToString());
            }
            //if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["FILE_DKEM"].ToString().Trim() != string.Empty)
            //{
            //    this.obj_HDG_HOP_DONG_Controller.pInfor.FILE_DKEM = Convert.ToByte(Entity.Tables["HDG_HOP_DONG"].Rows[0]["FILE_DKEM"].ToString());
            //}
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["TTHUAN_KHAC"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.TTHUAN_KHAC = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["TTHUAN_KHAC"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["NHAN_HDON"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.NHAN_HDON = Convert.ToInt16(Entity.Tables["HDG_HOP_DONG"].Rows[0]["NHAN_HDON"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["MA_HTHUC_GHDON"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.MA_HTHUC_GHDON = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["MA_HTHUC_GHDON"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["HTHUC_TBAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.HTHUC_TBAO = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["HTHUC_TBAO"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["CQUAN_TRTAI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.CQUAN_TRTAI = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["CQUAN_TRTAI"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["TLEPHAT_BMUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.TLEPHAT_BMUA = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["TLEPHAT_BMUA"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["TLEPHAT_BBAN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.TLEPHAT_BBAN = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["TLEPHAT_BBAN"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["MA_CNANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.MA_CNANG = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["MA_CNANG"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["HDG_HOP_DONG"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["HDG_HOP_DONG"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["HDG_HOP_DONG"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HOP_DONG_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["HDG_HOP_DONG"].Rows[0]["NGUOI_SUA"].ToString());
            }
        }
        public void mapEntityToInfoHDG_KHACH_HANG(DataSet Entity)
        {
            if (this.obj_HDG_KHACH_HANG_Controller == null)
            {
                this.obj_HDG_KHACH_HANG_Controller = new cls_HDG_KHACH_HANG_Controller();
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["ID_HDONG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.ID_HDONG = Convert.ToInt64(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["ID_HDONG"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MA_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.MA_KHANG = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MA_KHANG"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["SO_NHA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.SO_NHA = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["SO_NHA"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["DUONG_PHO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.DUONG_PHO = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["DUONG_PHO"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["DCHI_HDON"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.DCHI_HDON = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["DCHI_HDON"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MASO_THUE"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.MASO_THUE = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MASO_THUE"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["TLE_THUE"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.TLE_THUE = Convert.ToDecimal(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["TLE_THUE"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["LOAI_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.LOAI_KHANG = Convert.ToInt16(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["LOAI_KHANG"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MANHOM_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.MANHOM_KHANG = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MANHOM_KHANG"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MA_NN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.MA_NN = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MA_NN"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["TEN_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.TEN_KHANG = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["TEN_KHANG"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["TENHDON_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.TENHDON_KHANG = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["TENHDON_KHANG"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["TENTAT_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.TENTAT_KHANG = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["TENTAT_KHANG"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["NGAY_SINH"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.NGAY_SINH = Convert.ToDateTime(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["NGAY_SINH"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["NGAY_HLUC"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.NGAY_HLUC = Convert.ToDateTime(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["NGAY_HLUC"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["TRANG_THAI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.TRANG_THAI = Convert.ToInt16(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["TRANG_THAI"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["THANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.THANG = Convert.ToInt16(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["THANG"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["NAM"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.NAM = Convert.ToInt16(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["NAM"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MA_DVIDCHINH"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.MA_DVIDCHINH = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MA_DVIDCHINH"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["TKHOAN_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.TKHOAN_KHANG = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["TKHOAN_KHANG"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MA_NHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.MA_NHANG = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MA_NHANG"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MA_KHTT"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.MA_KHTT = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MA_KHTT"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MA_LOAIDN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.MA_LOAIDN = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MA_LOAIDN"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["DTHOAI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.DTHOAI = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["DTHOAI"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["FAX"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.FAX = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["FAX"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["EMAIL"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.EMAIL = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["EMAIL"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["WEBSITE"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.WEBSITE = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["WEBSITE"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["GIOI_TINH"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.GIOI_TINH = Convert.ToInt16(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["GIOI_TINH"].ToString());
            }
            //if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["HTHUC_NHAN_HDON"].ToString().Trim() != string.Empty)
            //{
            //    this.obj_HDG_KHACH_HANG_Controller.pInfor.HTHUC_NHAN_HDON = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["HTHUC_NHAN_HDON"].ToString());
            //}
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MA_CNANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.MA_CNANG = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["MA_CNANG"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["HDG_KHACH_HANG"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHACH_HANG_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["HDG_KHACH_HANG"].Rows[0]["NGUOI_SUA"].ToString());
            }
        }
        public void mapEntityToInfoHDG_DIEM_DO(DataSet Entity)
        {
            if (this.obj_HDG_DIEM_DO_Controller == null)
            {
                this.obj_HDG_DIEM_DO_Controller = new cls_HDG_DIEM_DO_Controller();
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["HDG_DIEM_DO"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["MA_DDO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.MA_DDO = Convert.ToString(Entity.Tables["HDG_DIEM_DO"].Rows[0]["MA_DDO"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["ID_HDONG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.ID_HDONG = Convert.ToInt64(Entity.Tables["HDG_DIEM_DO"].Rows[0]["ID_HDONG"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["MA_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.MA_KHANG = Convert.ToString(Entity.Tables["HDG_DIEM_DO"].Rows[0]["MA_KHANG"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["MA_DDO_DDIEN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.MA_DDO_DDIEN = Convert.ToString(Entity.Tables["HDG_DIEM_DO"].Rows[0]["MA_DDO_DDIEN"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["MA_CAPDA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.MA_CAPDA = Convert.ToString(Entity.Tables["HDG_DIEM_DO"].Rows[0]["MA_CAPDA"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["DIA_CHI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.DIA_CHI = Convert.ToString(Entity.Tables["HDG_DIEM_DO"].Rows[0]["DIA_CHI"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["ID_DIA_CHINH"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.ID_DIA_CHINH = Convert.ToString(Entity.Tables["HDG_DIEM_DO"].Rows[0]["ID_DIA_CHINH"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["KIMUA_CSPK"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.KIMUA_CSPK = Convert.ToInt16(Entity.Tables["HDG_DIEM_DO"].Rows[0]["KIMUA_CSPK"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["CSUAT"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.CSUAT = Convert.ToDecimal(Entity.Tables["HDG_DIEM_DO"].Rows[0]["CSUAT"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["MUC_DICH"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.MUC_DICH = Convert.ToString(Entity.Tables["HDG_DIEM_DO"].Rows[0]["MUC_DICH"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["SO_PHA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.SO_PHA = Convert.ToInt16(Entity.Tables["HDG_DIEM_DO"].Rows[0]["SO_PHA"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["SOHUU_LUOI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.SOHUU_LUOI = Convert.ToInt16(Entity.Tables["HDG_DIEM_DO"].Rows[0]["SOHUU_LUOI"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["LOAI_DDO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.LOAI_DDO = Convert.ToInt16(Entity.Tables["HDG_DIEM_DO"].Rows[0]["LOAI_DDO"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["SO_HO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.SO_HO = Convert.ToDecimal(Entity.Tables["HDG_DIEM_DO"].Rows[0]["SO_HO"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["LAN_CAPNHAT"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.LAN_CAPNHAT = Convert.ToInt16(Entity.Tables["HDG_DIEM_DO"].Rows[0]["LAN_CAPNHAT"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["THAO_TACDL"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.THAO_TACDL = Convert.ToString(Entity.Tables["HDG_DIEM_DO"].Rows[0]["THAO_TACDL"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["NGAY_HLUC"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.NGAY_HLUC = Convert.ToDateTime(Entity.Tables["HDG_DIEM_DO"].Rows[0]["NGAY_HLUC"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["MO_TA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.MO_TA = Convert.ToString(Entity.Tables["HDG_DIEM_DO"].Rows[0]["MO_TA"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["TRANG_THAI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.TRANG_THAI = Convert.ToInt16(Entity.Tables["HDG_DIEM_DO"].Rows[0]["TRANG_THAI"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["TTRANG_TREOTHAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.TTRANG_TREOTHAO = Convert.ToInt16(Entity.Tables["HDG_DIEM_DO"].Rows[0]["TTRANG_TREOTHAO"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["MA_CNANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.MA_CNANG = Convert.ToString(Entity.Tables["HDG_DIEM_DO"].Rows[0]["MA_CNANG"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["HDG_DIEM_DO"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["HDG_DIEM_DO"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["HDG_DIEM_DO"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["HDG_DIEM_DO"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DIEM_DO_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["HDG_DIEM_DO"].Rows[0]["NGUOI_SUA"].ToString());
            }
        }
        public void mapEntityToInfoHDG_DDO_SOGCS(DataSet Entity)
        {
            if (this.obj_HDG_DDO_SOGCS_Controller == null)
            {
                this.obj_HDG_DDO_SOGCS_Controller = new cls_HDG_DDO_SOGCS_Controller();
            }
            if (Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DDO_SOGCS_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["MA_DDO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DDO_SOGCS_Controller.pInfor.MA_DDO = Convert.ToString(Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["MA_DDO"].ToString());
            }
            if (Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["ID_QHE"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DDO_SOGCS_Controller.pInfor.ID_QHE = Convert.ToInt64(Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["ID_QHE"].ToString());
            }
            if (Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["MA_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DDO_SOGCS_Controller.pInfor.MA_KHANG = Convert.ToString(Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["MA_KHANG"].ToString());
            }
            if (Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["MA_SOGCS"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DDO_SOGCS_Controller.pInfor.MA_SOGCS = Convert.ToString(Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["MA_SOGCS"].ToString());
            }
            if (Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["MA_KVUC"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DDO_SOGCS_Controller.pInfor.MA_KVUC = Convert.ToString(Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["MA_KVUC"].ToString());
            }
            if (Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["NGAY_HLUC"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DDO_SOGCS_Controller.pInfor.NGAY_HLUC = Convert.ToDateTime(Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["NGAY_HLUC"].ToString());
            }
            if (Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["STT"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DDO_SOGCS_Controller.pInfor.STT = Convert.ToString(Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["STT"].ToString());
            }
            if (Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["KY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DDO_SOGCS_Controller.pInfor.KY = Convert.ToInt16(Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["KY"].ToString());
            }
            if (Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["THANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DDO_SOGCS_Controller.pInfor.THANG = Convert.ToInt16(Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["THANG"].ToString());
            }
            if (Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["NAM"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DDO_SOGCS_Controller.pInfor.NAM = Convert.ToInt16(Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["NAM"].ToString());
            }
            if (Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["MA_CNANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DDO_SOGCS_Controller.pInfor.MA_CNANG = Convert.ToString(Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["MA_CNANG"].ToString());
            }
            if (Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DDO_SOGCS_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DDO_SOGCS_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DDO_SOGCS_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_DDO_SOGCS_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["HDG_DDO_SOGCS"].Rows[0]["NGUOI_SUA"].ToString());
            }
        }
        public void mapEntityToInfoHDG_HO_NGHEO(DataSet Entity)
        {
            if (this.obj_HDG_HO_NGHEO_Controller == null)
            {
                this.obj_HDG_HO_NGHEO_Controller = new cls_HDG_HO_NGHEO_Controller();
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["MA_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.MA_KHANG = Convert.ToString(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["MA_KHANG"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["MA_DDO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.MA_DDO = Convert.ToString(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["MA_DDO"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["ID_HONGHEO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.ID_HONGHEO = Convert.ToInt64(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["ID_HONGHEO"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["TEN_DKY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.TEN_DKY = Convert.ToString(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["TEN_DKY"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["DCHI_DKY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.DCHI_DKY = Convert.ToString(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["DCHI_DKY"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["TEN_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.TEN_KHANG = Convert.ToString(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["TEN_KHANG"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["DCHI_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.DCHI_KHANG = Convert.ToString(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["DCHI_KHANG"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["LOAI_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.LOAI_KHANG = Convert.ToInt16(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["LOAI_KHANG"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["NGAY_DKY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.NGAY_DKY = Convert.ToDateTime(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["NGAY_DKY"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["SDT_DKY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.SDT_DKY = Convert.ToString(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["SDT_DKY"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["THANG_APDUNG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.THANG_APDUNG = Convert.ToInt16(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["THANG_APDUNG"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["NAM_APDUNG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.NAM_APDUNG = Convert.ToInt16(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["NAM_APDUNG"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["THANG_HUY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.THANG_HUY = Convert.ToInt16(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["THANG_HUY"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["NAM_HUY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.NAM_HUY = Convert.ToInt16(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["NAM_HUY"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["TRANG_THAI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.TRANG_THAI = Convert.ToInt16(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["TRANG_THAI"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["GHI_CHU"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.GHI_CHU = Convert.ToString(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["GHI_CHU"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["HDG_HO_NGHEO"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_HO_NGHEO_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["HDG_HO_NGHEO"].Rows[0]["NGUOI_SUA"].ToString());
            }
        }
        public void mapEntityToInfoHDG_PTHUC_TTOAN(DataSet Entity)
        {
            if (this.obj_HDG_PTHUC_TTOAN_Controller == null)
            {
                this.obj_HDG_PTHUC_TTOAN_Controller = new cls_HDG_PTHUC_TTOAN_Controller();
            }
            if (Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PTHUC_TTOAN_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["MA_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PTHUC_TTOAN_Controller.pInfor.MA_KHANG = Convert.ToString(Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["MA_KHANG"].ToString());
            }
            if (Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["ID_PTHUC_TTOAN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PTHUC_TTOAN_Controller.pInfor.ID_PTHUC_TTOAN = Convert.ToInt64(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["ID_PTHUC_TTOAN"].ToString());
            }
            if (Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["ID_HDONG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PTHUC_TTOAN_Controller.pInfor.ID_HDONG = Convert.ToInt64(Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["ID_HDONG"].ToString());
            }
            if (Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["HTHUC_TTOAN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PTHUC_TTOAN_Controller.pInfor.HTHUC_TTOAN = Convert.ToString(Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["HTHUC_TTOAN"].ToString());
            }
            if (Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["PTHUC_TTOAN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PTHUC_TTOAN_Controller.pInfor.PTHUC_TTOAN = Convert.ToString(Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["PTHUC_TTOAN"].ToString());
            }
            if (Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["TAI_KHOAN_DVI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PTHUC_TTOAN_Controller.pInfor.TAI_KHOAN_DVI = Convert.ToString(Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["TAI_KHOAN_DVI"].ToString());
            }
            if (Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["MA_NHANG_DVI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PTHUC_TTOAN_Controller.pInfor.MA_NHANG_DVI = Convert.ToString(Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["MA_NHANG_DVI"].ToString());
            }
            if (Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["NGAY_HLUC"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PTHUC_TTOAN_Controller.pInfor.NGAY_HLUC = Convert.ToDateTime(Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["NGAY_HLUC"].ToString());
            }
            if (Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["TRANG_THAI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PTHUC_TTOAN_Controller.pInfor.TRANG_THAI = Convert.ToInt16(Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["TRANG_THAI"].ToString());
            }
            if (Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["MA_CNANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PTHUC_TTOAN_Controller.pInfor.MA_CNANG = Convert.ToString(Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["MA_CNANG"].ToString());
            }
            if (Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PTHUC_TTOAN_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PTHUC_TTOAN_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PTHUC_TTOAN_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PTHUC_TTOAN_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["HDG_PTHUC_TTOAN"].Rows[0]["NGUOI_SUA"].ToString());
            }
        }
        public void mapEntityToInfoHDG_KHANG_LIENHE(DataSet Entity)
        {
            if (this.obj_HDG_KHANG_LIENHE_Controller == null)
            {
                this.obj_HDG_KHANG_LIENHE_Controller = new cls_HDG_KHANG_LIENHE_Controller();
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["MA_YCAU_KNAI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.MA_YCAU_KNAI = Convert.ToInt64(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["MA_YCAU_KNAI"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["ID_LIENHE"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.ID_LIENHE = Convert.ToInt64(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["ID_LIENHE"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["MA_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.MA_KHANG = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["MA_KHANG"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["STTU_UTIEN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.STTU_UTIEN = Convert.ToInt16(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["STTU_UTIEN"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["TEN_LIENLAC"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.TEN_LIENLAC = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["TEN_LIENLAC"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["DCHI_NHA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.DCHI_NHA = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["DCHI_NHA"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["SO_CMT"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.SO_CMT = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["SO_CMT"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NGAY_CAP"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.NGAY_CAP = Convert.ToDateTime(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NGAY_CAP"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NOI_CAP"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.NOI_CAP = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NOI_CAP"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["SOGIAY_UQUYEN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.SOGIAY_UQUYEN = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["SOGIAY_UQUYEN"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["TEN_CQUAN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.TEN_CQUAN = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["TEN_CQUAN"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["CHUC_VU"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.CHUC_VU = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["CHUC_VU"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["DCHI_CQUAN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.DCHI_CQUAN = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["DCHI_CQUAN"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["DTHOAI_DD"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.DTHOAI_DD = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["DTHOAI_DD"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["DTHOAI_CQ"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.DTHOAI_CQ = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["DTHOAI_CQ"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["DTHOAI_NR"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.DTHOAI_NR = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["DTHOAI_NR"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NGAY_HLUC"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.NGAY_HLUC = Convert.ToDateTime(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NGAY_HLUC"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["DTHOAI_KOGOI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.DTHOAI_KOGOI = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["DTHOAI_KOGOI"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["TRANG_THAI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.TRANG_THAI = Convert.ToInt16(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["TRANG_THAI"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["FAX"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.FAX = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["FAX"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["EMAIL"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.EMAIL = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["EMAIL"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["EMAIL2"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.EMAIL2 = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["EMAIL2"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["EMAIL_KOGUI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.EMAIL_KOGUI = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["EMAIL_KOGUI"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["WEBSITE"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.WEBSITE = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["WEBSITE"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["GIOI_TINH"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.GIOI_TINH = Convert.ToInt16(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["GIOI_TINH"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NGAY_SINH"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.NGAY_SINH = Convert.ToDateTime(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NGAY_SINH"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NGHE_NGHIEP"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.NGHE_NGHIEP = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NGHE_NGHIEP"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["TRINH_DO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.TRINH_DO = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["TRINH_DO"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["MA_CNANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.MA_CNANG = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["MA_CNANG"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_KHANG_LIENHE_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["HDG_KHANG_LIENHE"].Rows[0]["NGUOI_SUA"].ToString());
            }
        }
        public void mapEntityToInfoHDG_VITRI_DDO(DataSet Entity)
        {
            if (this.obj_HDG_VITRI_DDO_Controller == null)
            {
                this.obj_HDG_VITRI_DDO_Controller = new cls_HDG_VITRI_DDO_Controller();
            }
            if (Entity.Tables["HDG_VITRI_DDO"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_VITRI_DDO_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["HDG_VITRI_DDO"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["HDG_VITRI_DDO"].Rows[0]["MA_DDO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_VITRI_DDO_Controller.pInfor.MA_DDO = Convert.ToString(Entity.Tables["HDG_VITRI_DDO"].Rows[0]["MA_DDO"].ToString());
            }
            if (Entity.Tables["HDG_VITRI_DDO"].Rows[0]["ID_VITRI_DDO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_VITRI_DDO_Controller.pInfor.ID_VITRI_DDO = Convert.ToInt64(Entity.Tables["HDG_VITRI_DDO"].Rows[0]["ID_VITRI_DDO"].ToString());
            }
            if (Entity.Tables["HDG_VITRI_DDO"].Rows[0]["MA_TRAM"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_VITRI_DDO_Controller.pInfor.MA_TRAM = Convert.ToString(Entity.Tables["HDG_VITRI_DDO"].Rows[0]["MA_TRAM"].ToString());
            }
            if (Entity.Tables["HDG_VITRI_DDO"].Rows[0]["MA_LO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_VITRI_DDO_Controller.pInfor.MA_LO = Convert.ToString(Entity.Tables["HDG_VITRI_DDO"].Rows[0]["MA_LO"].ToString());
            }
            if (Entity.Tables["HDG_VITRI_DDO"].Rows[0]["MA_TO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_VITRI_DDO_Controller.pInfor.MA_TO = Convert.ToString(Entity.Tables["HDG_VITRI_DDO"].Rows[0]["MA_TO"].ToString());
            }
            if (Entity.Tables["HDG_VITRI_DDO"].Rows[0]["PHA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_VITRI_DDO_Controller.pInfor.PHA = Convert.ToString(Entity.Tables["HDG_VITRI_DDO"].Rows[0]["PHA"].ToString());
            }
            if (Entity.Tables["HDG_VITRI_DDO"].Rows[0]["SO_COT"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_VITRI_DDO_Controller.pInfor.SO_COT = Convert.ToString(Entity.Tables["HDG_VITRI_DDO"].Rows[0]["SO_COT"].ToString());
            }
            if (Entity.Tables["HDG_VITRI_DDO"].Rows[0]["SO_HOM"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_VITRI_DDO_Controller.pInfor.SO_HOM = Convert.ToString(Entity.Tables["HDG_VITRI_DDO"].Rows[0]["SO_HOM"].ToString());
            }
            if (Entity.Tables["HDG_VITRI_DDO"].Rows[0]["MA_CNANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_VITRI_DDO_Controller.pInfor.MA_CNANG = Convert.ToString(Entity.Tables["HDG_VITRI_DDO"].Rows[0]["MA_CNANG"].ToString());
            }
            if (Entity.Tables["HDG_VITRI_DDO"].Rows[0]["NGAY_HLUC"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_VITRI_DDO_Controller.pInfor.NGAY_HLUC = Convert.ToDateTime(Entity.Tables["HDG_VITRI_DDO"].Rows[0]["NGAY_HLUC"].ToString());
            }
            if (Entity.Tables["HDG_VITRI_DDO"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_VITRI_DDO_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["HDG_VITRI_DDO"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["HDG_VITRI_DDO"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_VITRI_DDO_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["HDG_VITRI_DDO"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["HDG_VITRI_DDO"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_VITRI_DDO_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["HDG_VITRI_DDO"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["HDG_VITRI_DDO"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_VITRI_DDO_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["HDG_VITRI_DDO"].Rows[0]["NGUOI_SUA"].ToString());
            }
        }
        public void mapEntityToInfoDD_BBAN_BDONG(DataSet Entity)
        {
            if (this.obj_DD_BBAN_BDONG_Controller == null)
            {
                this.obj_DD_BBAN_BDONG_Controller = new cls_DD_BBAN_BDONG_Controller();
            }
            if (Entity.Tables["DD_BBAN_BDONG"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BBAN_BDONG_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["DD_BBAN_BDONG"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["DD_BBAN_BDONG"].Rows[0]["MA_DDO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BBAN_BDONG_Controller.pInfor.MA_DDO = Convert.ToString(Entity.Tables["DD_BBAN_BDONG"].Rows[0]["MA_DDO"].ToString());
            }
            if (Entity.Tables["DD_BBAN_BDONG"].Rows[0]["ID_BBAN"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BBAN_BDONG_Controller.pInfor.ID_BBAN = Convert.ToInt64(Entity.Tables["DD_BBAN_BDONG"].Rows[0]["ID_BBAN"].ToString());
            }
            if (Entity.Tables["DD_BBAN_BDONG"].Rows[0]["SO_BBAN"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BBAN_BDONG_Controller.pInfor.SO_BBAN = Convert.ToString(Entity.Tables["DD_BBAN_BDONG"].Rows[0]["SO_BBAN"].ToString());
            }
            if (Entity.Tables["DD_BBAN_BDONG"].Rows[0]["NGAY_BDONG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BBAN_BDONG_Controller.pInfor.NGAY_BDONG = Convert.ToDateTime(Entity.Tables["DD_BBAN_BDONG"].Rows[0]["NGAY_BDONG"].ToString());
            }
            if (Entity.Tables["DD_BBAN_BDONG"].Rows[0]["MA_LDO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BBAN_BDONG_Controller.pInfor.MA_LDO = Convert.ToString(Entity.Tables["DD_BBAN_BDONG"].Rows[0]["MA_LDO"].ToString());
            }
            if (Entity.Tables["DD_BBAN_BDONG"].Rows[0]["MA_NVIEN"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BBAN_BDONG_Controller.pInfor.MA_NVIEN = Convert.ToString(Entity.Tables["DD_BBAN_BDONG"].Rows[0]["MA_NVIEN"].ToString());
            }
            if (Entity.Tables["DD_BBAN_BDONG"].Rows[0]["MA_NVKCHI"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BBAN_BDONG_Controller.pInfor.MA_NVKCHI = Convert.ToString(Entity.Tables["DD_BBAN_BDONG"].Rows[0]["MA_NVKCHI"].ToString());
            }
            if (Entity.Tables["DD_BBAN_BDONG"].Rows[0]["NGAY_KCHI"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BBAN_BDONG_Controller.pInfor.NGAY_KCHI = Convert.ToDateTime(Entity.Tables["DD_BBAN_BDONG"].Rows[0]["NGAY_KCHI"].ToString());
            }
            if (Entity.Tables["DD_BBAN_BDONG"].Rows[0]["MA_CNANG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BBAN_BDONG_Controller.pInfor.MA_CNANG = Convert.ToString(Entity.Tables["DD_BBAN_BDONG"].Rows[0]["MA_CNANG"].ToString());
            }
            if (Entity.Tables["DD_BBAN_BDONG"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BBAN_BDONG_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["DD_BBAN_BDONG"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["DD_BBAN_BDONG"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BBAN_BDONG_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["DD_BBAN_BDONG"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["DD_BBAN_BDONG"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BBAN_BDONG_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["DD_BBAN_BDONG"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["DD_BBAN_BDONG"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BBAN_BDONG_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["DD_BBAN_BDONG"].Rows[0]["NGUOI_SUA"].ToString());
            }
        }
        public void mapEntityToInfoDD_BCS_CTO(DataSet Entity)
        {
            if (this.obj_DD_BCS_CTO_Controller == null)
            {
                this.obj_DD_BCS_CTO_Controller = new cls_DD_BCS_CTO_Controller();
            }
            if (Entity.Tables["DD_BCS_CTO"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BCS_CTO_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["DD_BCS_CTO"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["DD_BCS_CTO"].Rows[0]["MA_DDO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BCS_CTO_Controller.pInfor.MA_DDO = Convert.ToString(Entity.Tables["DD_BCS_CTO"].Rows[0]["MA_DDO"].ToString());
            }
            if (Entity.Tables["DD_BCS_CTO"].Rows[0]["ID_BCS"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BCS_CTO_Controller.pInfor.ID_BCS = Convert.ToInt64(Entity.Tables["DD_BCS_CTO"].Rows[0]["ID_BCS"].ToString());
            }
            if (Entity.Tables["DD_BCS_CTO"].Rows[0]["ID_BBAN"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BCS_CTO_Controller.pInfor.ID_BBAN = Convert.ToInt64(Entity.Tables["DD_BCS_CTO"].Rows[0]["ID_BBAN"].ToString());
            }
            if (Entity.Tables["DD_BCS_CTO"].Rows[0]["MA_CTO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BCS_CTO_Controller.pInfor.MA_CTO = Convert.ToString(Entity.Tables["DD_BCS_CTO"].Rows[0]["MA_CTO"].ToString());
            }
            if (Entity.Tables["DD_BCS_CTO"].Rows[0]["SO_CTO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BCS_CTO_Controller.pInfor.SO_CTO = Convert.ToString(Entity.Tables["DD_BCS_CTO"].Rows[0]["SO_CTO"].ToString());
            }
            if (Entity.Tables["DD_BCS_CTO"].Rows[0]["BCS"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BCS_CTO_Controller.pInfor.BCS = Convert.ToString(Entity.Tables["DD_BCS_CTO"].Rows[0]["BCS"].ToString());
            }
            if (Entity.Tables["DD_BCS_CTO"].Rows[0]["HS_NHAN"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BCS_CTO_Controller.pInfor.HS_NHAN = Convert.ToDecimal(Entity.Tables["DD_BCS_CTO"].Rows[0]["HS_NHAN"].ToString());
            }
            if (Entity.Tables["DD_BCS_CTO"].Rows[0]["MA_CNANG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BCS_CTO_Controller.pInfor.MA_CNANG = Convert.ToString(Entity.Tables["DD_BCS_CTO"].Rows[0]["MA_CNANG"].ToString());
            }
            if (Entity.Tables["DD_BCS_CTO"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BCS_CTO_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["DD_BCS_CTO"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["DD_BCS_CTO"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BCS_CTO_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["DD_BCS_CTO"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["DD_BCS_CTO"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BCS_CTO_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["DD_BCS_CTO"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["DD_BCS_CTO"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BCS_CTO_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["DD_BCS_CTO"].Rows[0]["NGUOI_SUA"].ToString());
            }
        }
        public void mapEntityToInfoDD_BDONG_CTO(DataSet Entity)
        {
            if (this.obj_DD_BDONG_CTO_Controller == null)
            {
                this.obj_DD_BDONG_CTO_Controller = new cls_DD_BDONG_CTO_Controller();
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["DD_BDONG_CTO"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["MA_DDO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.MA_DDO = Convert.ToString(Entity.Tables["DD_BDONG_CTO"].Rows[0]["MA_DDO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["ID_BBAN"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.ID_BBAN = Convert.ToInt64(Entity.Tables["DD_BDONG_CTO"].Rows[0]["ID_BBAN"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["MA_CTO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.MA_CTO = Convert.ToString(Entity.Tables["DD_BDONG_CTO"].Rows[0]["MA_CTO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["SO_CTO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.SO_CTO = Convert.ToString(Entity.Tables["DD_BDONG_CTO"].Rows[0]["SO_CTO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["LAN"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.LAN = Convert.ToInt16(Entity.Tables["DD_BDONG_CTO"].Rows[0]["LAN"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["MA_BDONG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.MA_BDONG = Convert.ToString(Entity.Tables["DD_BDONG_CTO"].Rows[0]["MA_BDONG"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["NGAY_BDONG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.NGAY_BDONG = Convert.ToDateTime(Entity.Tables["DD_BDONG_CTO"].Rows[0]["NGAY_BDONG"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["MA_CLOAI"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.MA_CLOAI = Convert.ToString(Entity.Tables["DD_BDONG_CTO"].Rows[0]["MA_CLOAI"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["LOAI_CTO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.LOAI_CTO = Convert.ToString(Entity.Tables["DD_BDONG_CTO"].Rows[0]["LOAI_CTO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["VTRI_TREO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.VTRI_TREO = Convert.ToInt16(Entity.Tables["DD_BDONG_CTO"].Rows[0]["VTRI_TREO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["MA_SOCBOOC"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.MA_SOCBOOC = Convert.ToString(Entity.Tables["DD_BDONG_CTO"].Rows[0]["MA_SOCBOOC"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["SO_VIENCBOOC"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.SO_VIENCBOOC = Convert.ToInt16(Entity.Tables["DD_BDONG_CTO"].Rows[0]["SO_VIENCBOOC"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["MA_SOCHOM"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.MA_SOCHOM = Convert.ToString(Entity.Tables["DD_BDONG_CTO"].Rows[0]["MA_SOCHOM"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["SO_VIENCHOM"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.SO_VIENCHOM = Convert.ToInt16(Entity.Tables["DD_BDONG_CTO"].Rows[0]["SO_VIENCHOM"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["SO_COT"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.SO_COT = Convert.ToString(Entity.Tables["DD_BDONG_CTO"].Rows[0]["SO_COT"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["SO_HOM"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.SO_HOM = Convert.ToString(Entity.Tables["DD_BDONG_CTO"].Rows[0]["SO_HOM"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["MA_CNANG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.MA_CNANG = Convert.ToString(Entity.Tables["DD_BDONG_CTO"].Rows[0]["MA_CNANG"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["DD_BDONG_CTO"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["DD_BDONG_CTO"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["DD_BDONG_CTO"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["DD_BDONG_CTO"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_CTO_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["DD_BDONG_CTO"].Rows[0]["NGUOI_SUA"].ToString());
            }
        }
        public void mapEntityToInfoDD_BDONG_HTAI(DataSet Entity)
        {
            if (this.obj_DD_BDONG_HTAI_Controller == null)
            {
                this.obj_DD_BDONG_HTAI_Controller = new cls_DD_BDONG_HTAI_Controller();
            }
            if (Entity.Tables["DD_BDONG_HTAI"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_HTAI_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["DD_BDONG_HTAI"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["DD_BDONG_HTAI"].Rows[0]["MA_DDO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_HTAI_Controller.pInfor.MA_DDO = Convert.ToString(Entity.Tables["DD_BDONG_HTAI"].Rows[0]["MA_DDO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_HTAI"].Rows[0]["MA_TBI"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_HTAI_Controller.pInfor.MA_TBI = Convert.ToString(Entity.Tables["DD_BDONG_HTAI"].Rows[0]["MA_TBI"].ToString());
            }
            if (Entity.Tables["DD_BDONG_HTAI"].Rows[0]["SO_TBI"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_HTAI_Controller.pInfor.SO_TBI = Convert.ToString(Entity.Tables["DD_BDONG_HTAI"].Rows[0]["SO_TBI"].ToString());
            }
            if (Entity.Tables["DD_BDONG_HTAI"].Rows[0]["LOAI_TBI"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_HTAI_Controller.pInfor.LOAI_TBI = Convert.ToString(Entity.Tables["DD_BDONG_HTAI"].Rows[0]["LOAI_TBI"].ToString());
            }
            if (Entity.Tables["DD_BDONG_HTAI"].Rows[0]["NGAY_BDONG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_HTAI_Controller.pInfor.NGAY_BDONG = Convert.ToDateTime(Entity.Tables["DD_BDONG_HTAI"].Rows[0]["NGAY_BDONG"].ToString());
            }
            if (Entity.Tables["DD_BDONG_HTAI"].Rows[0]["MA_CLOAI"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_HTAI_Controller.pInfor.MA_CLOAI = Convert.ToString(Entity.Tables["DD_BDONG_HTAI"].Rows[0]["MA_CLOAI"].ToString());
            }
            if (Entity.Tables["DD_BDONG_HTAI"].Rows[0]["MA_CNANG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_HTAI_Controller.pInfor.MA_CNANG = Convert.ToString(Entity.Tables["DD_BDONG_HTAI"].Rows[0]["MA_CNANG"].ToString());
            }
            if (Entity.Tables["DD_BDONG_HTAI"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_HTAI_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["DD_BDONG_HTAI"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_HTAI"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_HTAI_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["DD_BDONG_HTAI"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_HTAI"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_HTAI_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["DD_BDONG_HTAI"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["DD_BDONG_HTAI"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_HTAI_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["DD_BDONG_HTAI"].Rows[0]["NGUOI_SUA"].ToString());
            }
        }
        public void mapEntityToInfoGCS_CHISO(DataSet Entity)
        {
            if (this.obj_GCS_CHISO_Controller == null)
            {
                this.obj_GCS_CHISO_Controller = new cls_GCS_CHISO_Controller();
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["GCS_CHISO"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["MA_DDO"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.MA_DDO = Convert.ToString(Entity.Tables["GCS_CHISO"].Rows[0]["MA_DDO"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["ID_CHISO"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.ID_CHISO = Convert.ToInt64(Entity.Tables["GCS_CHISO"].Rows[0]["ID_CHISO"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["ID_BCS"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.ID_BCS = Convert.ToInt64(Entity.Tables["GCS_CHISO"].Rows[0]["ID_BCS"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["BCS"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.BCS = Convert.ToString(Entity.Tables["GCS_CHISO"].Rows[0]["BCS"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["HS_NHAN"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.HS_NHAN = Convert.ToDecimal(Entity.Tables["GCS_CHISO"].Rows[0]["HS_NHAN"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["MA_CTO"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.MA_CTO = Convert.ToString(Entity.Tables["GCS_CHISO"].Rows[0]["MA_CTO"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["SO_CTO"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.SO_CTO = Convert.ToString(Entity.Tables["GCS_CHISO"].Rows[0]["SO_CTO"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["KY"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.KY = Convert.ToInt16(Entity.Tables["GCS_CHISO"].Rows[0]["KY"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["THANG"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.THANG = Convert.ToInt16(Entity.Tables["GCS_CHISO"].Rows[0]["THANG"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["NAM"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.NAM = Convert.ToInt16(Entity.Tables["GCS_CHISO"].Rows[0]["NAM"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["CHISO_CU"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.CHISO_CU = Convert.ToDecimal(Entity.Tables["GCS_CHISO"].Rows[0]["CHISO_CU"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["CHISO_MOI"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.CHISO_MOI = Convert.ToDecimal(Entity.Tables["GCS_CHISO"].Rows[0]["CHISO_MOI"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["SAN_LUONG"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.SAN_LUONG = Convert.ToDecimal(Entity.Tables["GCS_CHISO"].Rows[0]["SAN_LUONG"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["SLUONG_TTIEP"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.SLUONG_TTIEP = Convert.ToDecimal(Entity.Tables["GCS_CHISO"].Rows[0]["SLUONG_TTIEP"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["SLUONG_TRPHU"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.SLUONG_TRPHU = Convert.ToDecimal(Entity.Tables["GCS_CHISO"].Rows[0]["SLUONG_TRPHU"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["LOAI_CHISO"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.LOAI_CHISO = Convert.ToString(Entity.Tables["GCS_CHISO"].Rows[0]["LOAI_CHISO"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["MA_TTCTO"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.MA_TTCTO = Convert.ToString(Entity.Tables["GCS_CHISO"].Rows[0]["MA_TTCTO"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["NGAY_DKY"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.NGAY_DKY = Convert.ToDateTime(Entity.Tables["GCS_CHISO"].Rows[0]["NGAY_DKY"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["NGAY_CKY"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.NGAY_CKY = Convert.ToDateTime(Entity.Tables["GCS_CHISO"].Rows[0]["NGAY_CKY"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["SLUONG_1"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.SLUONG_1 = Convert.ToDecimal(Entity.Tables["GCS_CHISO"].Rows[0]["SLUONG_1"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["SLUONG_2"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.SLUONG_2 = Convert.ToDecimal(Entity.Tables["GCS_CHISO"].Rows[0]["SLUONG_2"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["SLUONG_3"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.SLUONG_3 = Convert.ToDecimal(Entity.Tables["GCS_CHISO"].Rows[0]["SLUONG_3"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["MA_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.MA_KHANG = Convert.ToString(Entity.Tables["GCS_CHISO"].Rows[0]["MA_KHANG"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["MA_CNANG"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.MA_CNANG = Convert.ToString(Entity.Tables["GCS_CHISO"].Rows[0]["MA_CNANG"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["GCS_CHISO"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["GCS_CHISO"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["GCS_CHISO"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["GCS_CHISO"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_GCS_CHISO_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["GCS_CHISO"].Rows[0]["NGUOI_SUA"].ToString());
            }
        }
        public void mapEntityToInfoHDG_BBAN_APGIA(DataSet Entity)
        {
            if (this.obj_HDG_BBAN_APGIA_Controller == null)
            {
                this.obj_HDG_BBAN_APGIA_Controller = new cls_HDG_BBAN_APGIA_Controller();
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["MA_DDO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.MA_DDO = Convert.ToString(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["MA_DDO"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["ID_BBANAGIA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.ID_BBANAGIA = Convert.ToInt64(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["ID_BBANAGIA"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["MA_BBANAGIA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.MA_BBANAGIA = Convert.ToString(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["MA_BBANAGIA"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["SO_THUTU"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.SO_THUTU = Convert.ToInt16(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["SO_THUTU"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["NGAY_HLUC"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.NGAY_HLUC = Convert.ToDateTime(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["NGAY_HLUC"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["DINH_MUC"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.DINH_MUC = Convert.ToString(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["DINH_MUC"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["LOAI_DMUC"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.LOAI_DMUC = Convert.ToString(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["LOAI_DMUC"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["LOAI_BCS"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.LOAI_BCS = Convert.ToString(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["LOAI_BCS"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["TGIAN_BDIEN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.TGIAN_BDIEN = Convert.ToString(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["TGIAN_BDIEN"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["MA_NHOMNN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.MA_NHOMNN = Convert.ToString(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["MA_NHOMNN"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["MA_NGIA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.MA_NGIA = Convert.ToString(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["MA_NGIA"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["MA_NN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.MA_NN = Convert.ToString(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["MA_NN"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["TRANG_THAI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.TRANG_THAI = Convert.ToInt16(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["TRANG_THAI"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["SO_HO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.SO_HO = Convert.ToDecimal(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["SO_HO"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["MA_CAPDAP"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.MA_CAPDAP = Convert.ToString(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["MA_CAPDAP"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["DIEN_GIAI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.DIEN_GIAI = Convert.ToString(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["DIEN_GIAI"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["MA_CNANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.MA_CNANG = Convert.ToString(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["MA_CNANG"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_BBAN_APGIA_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["HDG_BBAN_APGIA"].Rows[0]["NGUOI_SUA"].ToString());
            }
        }
        public void mapEntityToInfoHDG_PHU_LUC_HD(DataSet Entity)
        {
            if (this.obj_HDG_PHU_LUC_HD_Controller == null)
            {
                this.obj_HDG_PHU_LUC_HD_Controller = new cls_HDG_PHU_LUC_HD_Controller();
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["ID_PHU_LUC_HD"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.ID_PHU_LUC_HD = Convert.ToInt64(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["ID_PHU_LUC_HD"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["ID_HDONG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.ID_HDONG = Convert.ToInt64(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["ID_HDONG"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["NGAY_HLUC"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.NGAY_HLUC = Convert.ToDateTime(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["NGAY_HLUC"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["DDIEM_DDIEN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.DDIEM_DDIEN = Convert.ToString(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["DDIEM_DDIEN"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["MUC_DICHSD"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.MUC_DICHSD = Convert.ToString(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["MUC_DICHSD"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["DIEM_DAUNOI"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.DIEM_DAUNOI = Convert.ToString(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["DIEM_DAUNOI"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["TGIAN_CAPDIEN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.TGIAN_CAPDIEN = Convert.ToString(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["TGIAN_CAPDIEN"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["DIEN_AP"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.DIEN_AP = Convert.ToDecimal(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["DIEN_AP"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["DONVI_DIENAP"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.DONVI_DIENAP = Convert.ToString(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["DONVI_DIENAP"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["SSODAP_BT"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.SSODAP_BT = Convert.ToDecimal(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["SSODAP_BT"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["SSODAP_SCTU"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.SSODAP_SCTU = Convert.ToDecimal(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["SSODAP_SCTU"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["SSODAP_SCDEN"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.SSODAP_SCDEN = Convert.ToDecimal(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["SSODAP_SCDEN"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["VITRI_DODEM"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.VITRI_DODEM = Convert.ToString(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["VITRI_DODEM"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["RGIOI_SOHUU"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.RGIOI_SOHUU = Convert.ToString(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["RGIOI_SOHUU"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["RGIOI_VHANH"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.RGIOI_VHANH = Convert.ToString(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["RGIOI_VHANH"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["NGUOI_SUA"].ToString());
            }
            if (Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["MA_CNANG"].ToString().Trim() != string.Empty)
            {
                this.obj_HDG_PHU_LUC_HD_Controller.pInfor.MA_CNANG = Convert.ToString(Entity.Tables["HDG_PHU_LUC_HD"].Rows[0]["MA_CNANG"].ToString());
            }
        }
        public void mapEntityToInfoDD_BDONG_TTHAO(DataSet Entity)
        {
            if (this.obj_DD_BDONG_TTHAO_Controller == null)
            {
                this.obj_DD_BDONG_TTHAO_Controller = new cls_DD_BDONG_TTHAO_Controller();
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["ID_LSU_TTHAO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.ID_LSU_TTHAO = Convert.ToInt64(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["ID_LSU_TTHAO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["ID_BBAN"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.ID_BBAN = Convert.ToInt64(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["ID_BBAN"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_DDO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.MA_DDO = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_DDO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.MA_KHANG = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_KHANG"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["TEN_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.TEN_KHANG = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["TEN_KHANG"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["DCHI_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.DCHI_KHANG = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["DCHI_KHANG"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["DCHI_DDO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.DCHI_DDO = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["DCHI_DDO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_SOGCS"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.MA_SOGCS = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_SOGCS"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_TRAM"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.MA_TRAM = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_TRAM"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["KVUC_STT"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.KVUC_STT = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["KVUC_STT"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["LOAI_DDO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.LOAI_DDO = Convert.ToInt16(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["LOAI_DDO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["DDO_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.DDO_KHANG = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["DDO_KHANG"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_BDONG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.MA_BDONG = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_BDONG"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["SO_PHA"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.SO_PHA = Convert.ToInt16(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["SO_PHA"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["LOAI_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.LOAI_KHANG = Convert.ToInt16(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["LOAI_KHANG"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["NGAY_BDONG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.NGAY_BDONG = Convert.ToDateTime(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["NGAY_BDONG"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["NGAY_KCHI"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.NGAY_KCHI = Convert.ToDateTime(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["NGAY_KCHI"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_NVIEN"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.MA_NVIEN = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_NVIEN"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_NVKCHI"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.MA_NVKCHI = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_NVKCHI"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_LDO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.MA_LDO = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_LDO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_TBI"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.MA_TBI = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_TBI"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["LOAI_TBI"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.LOAI_TBI = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["LOAI_TBI"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["SO_TBI"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.SO_TBI = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["SO_TBI"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_CLOAI"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.MA_CLOAI = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_CLOAI"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["VTRI_TREO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.VTRI_TREO = Convert.ToInt16(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["VTRI_TREO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["BCS"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.BCS = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["BCS"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["LOAI_CHISO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.LOAI_CHISO = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["LOAI_CHISO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["SO_COT"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.SO_COT = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["SO_COT"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["SO_HOM"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.SO_HOM = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["SO_HOM"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["CHISO_CU"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.CHISO_CU = Convert.ToDecimal(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["CHISO_CU"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["CHISO_MOI"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.CHISO_MOI = Convert.ToDecimal(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["CHISO_MOI"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["SAN_LUONG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.SAN_LUONG = Convert.ToDecimal(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["SAN_LUONG"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["SLUONG_TTIEP"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.SLUONG_TTIEP = Convert.ToDecimal(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["SLUONG_TTIEP"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["HS_NHAN"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.HS_NHAN = Convert.ToDecimal(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["HS_NHAN"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_CNANG"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.MA_CNANG = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["MA_CNANG"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["NGAY_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.NGAY_SUA = Convert.ToDateTime(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["NGAY_SUA"].ToString());
            }
            if (Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["NGUOI_SUA"].ToString().Trim() != string.Empty)
            {
                this.obj_DD_BDONG_TTHAO_Controller.pInfor.NGUOI_SUA = Convert.ToString(Entity.Tables["DD_BDONG_TTHAO"].Rows[0]["NGUOI_SUA"].ToString());
            }
        }
        public void mapEntityToInfoNPC_CHAMNO_OFFLINE(DataSet Entity)
        {
            if (this.obj_NPC_CHAMNO_OFFLINE_Controller == null)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller = new cls_NPC_CHAMNO_OFFLINE_Controller();
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["MA_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.MA_KHANG = Convert.ToString(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["MA_KHANG"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["GROUP_NHOM"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.GROUP_NHOM = Convert.ToInt64(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["GROUP_NHOM"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["ID_OFFLINE"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.ID_OFFLINE = Convert.ToInt64(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["ID_OFFLINE"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["ID_HDON"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.ID_HDON = Convert.ToInt64(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["ID_HDON"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["TIEN_NOP"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.TIEN_NOP = Convert.ToDecimal(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["TIEN_NOP"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["THUE_NOP"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.THUE_NOP = Convert.ToDecimal(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["THUE_NOP"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["SO_BBGIAO"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.SO_BBGIAO = Convert.ToInt64(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["SO_BBGIAO"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["MA_TNGAN"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.MA_TNGAN = Convert.ToString(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["MA_TNGAN"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["MA_TNGAN_THUHO"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.MA_TNGAN_THUHO = Convert.ToString(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["MA_TNGAN_THUHO"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["NGAY_CHAMNO"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.NGAY_CHAMNO = Convert.ToDateTime(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["NGAY_CHAMNO"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["NAM_HT"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.NAM_HT = Convert.ToInt16(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["NAM_HT"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["THANG_HT"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.THANG_HT = Convert.ToInt16(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["THANG_HT"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["TRANGTHAI"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.TRANGTHAI = Convert.ToInt16(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["TRANGTHAI"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["TINHTRANGIN"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.TINHTRANGIN = Convert.ToString(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["TINHTRANGIN"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["FMIS"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_Controller.pInfor.FMIS = Convert.ToString(Entity.Tables["NPC_CHAMNO_OFFLINE"].Rows[0]["FMIS"].ToString());
            }
        }
        public void mapEntityToInfoNPC_CHAMNO_OFFLINE_LOG(DataSet Entity)
        {
            if (this.obj_NPC_CHAMNO_OFFLINE_LOG_Controller == null)
            {
                this.obj_NPC_CHAMNO_OFFLINE_LOG_Controller = new cls_NPC_CHAMNO_OFFLINE_LOG_Controller();
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["MA_DVIQLY"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_LOG_Controller.pInfor.MA_DVIQLY = Convert.ToString(Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["MA_DVIQLY"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["MA_KHANG"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_LOG_Controller.pInfor.MA_KHANG = Convert.ToString(Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["MA_KHANG"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["ID_LOG"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_LOG_Controller.pInfor.ID_LOG = Convert.ToInt64(Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["ID_LOG"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["ID_HDON"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_LOG_Controller.pInfor.ID_HDON = Convert.ToInt64(Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["ID_HDON"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["THANG_HT"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_LOG_Controller.pInfor.THANG_HT = Convert.ToInt16(Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["THANG_HT"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["NAM_HT"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_LOG_Controller.pInfor.NAM_HT = Convert.ToInt16(Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["NAM_HT"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["MA_TNGAN"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_LOG_Controller.pInfor.MA_TNGAN = Convert.ToString(Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["MA_TNGAN"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["SO_BBGIAO"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_LOG_Controller.pInfor.SO_BBGIAO = Convert.ToInt64(Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["SO_BBGIAO"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["NGAY_CHAMNO"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_LOG_Controller.pInfor.NGAY_CHAMNO = Convert.ToDateTime(Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["NGAY_CHAMNO"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["TRANGTHAI"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_LOG_Controller.pInfor.TRANGTHAI = Convert.ToInt16(Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["TRANGTHAI"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["NGAY_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_LOG_Controller.pInfor.NGAY_TAO = Convert.ToDateTime(Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["NGAY_TAO"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["NGUOI_TAO"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_LOG_Controller.pInfor.NGUOI_TAO = Convert.ToString(Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["NGUOI_TAO"].ToString());
            }
            if (Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["GIO"].ToString().Trim() != string.Empty)
            {
                this.obj_NPC_CHAMNO_OFFLINE_LOG_Controller.pInfor.GIO = Convert.ToInt32(Entity.Tables["NPC_CHAMNO_OFFLINE_LOG"].Rows[0]["GIO"].ToString());
            }
        }
        public void mapinfo_CN_PHIEU_THU(DataRow dr, string strMatngan, string strUsername)
        {
            if (this.obj_CN_PHIEU_THU_Controller == null)
            { this.obj_CN_PHIEU_THU_Controller = new cls_CN_PHIEU_THU_Controller(); }
            this.obj_CN_PHIEU_THU_Controller.pInfor.MA_DVIQLY = dr["MA_DVIQLY"].ToString();
            this.obj_CN_PHIEU_THU_Controller.pInfor.MA_KHANG = dr["MA_KHANG"].ToString();
            this.obj_CN_PHIEU_THU_Controller.pInfor.MA_KHTT = dr["MA_KHANG"].ToString();
            this.obj_CN_PHIEU_THU_Controller.pInfor.MA_PTTT = dr["MA_PTTT"].ToString().Trim();
            this.obj_CN_PHIEU_THU_Controller.pInfor.MA_TNGAN = strMatngan;
            this.obj_CN_PHIEU_THU_Controller.pInfor.NGAY_NOP = Convert.ToDateTime(dr["NGAY_NOP"].ToString());
            this.obj_CN_PHIEU_THU_Controller.pInfor.NGAY_SUA = DateTime.Now;
            this.obj_CN_PHIEU_THU_Controller.pInfor.NGAY_TAO = DateTime.Now;
            this.obj_CN_PHIEU_THU_Controller.pInfor.NGUOI_TAO = strUsername;
            this.obj_CN_PHIEU_THU_Controller.pInfor.NGUOI_SUA = strUsername;
            this.obj_CN_PHIEU_THU_Controller.pInfor.SO_BBQTOAN = 0;
            this.obj_CN_PHIEU_THU_Controller.pInfor.SO_TIEN = Convert.ToDecimal(dr["SO_TIEN"]) + Convert.ToDecimal(dr["TIEN_GTGT"]);
            this.obj_CN_PHIEU_THU_Controller.pInfor.TIEN_THUA = 0;
            this.obj_CN_PHIEU_THU_Controller.pInfor.TSO_HDON = 1;
            this.obj_CN_PHIEU_THU_Controller.pInfor.MA_CNANG = "-3";

        }
        public void mapinfo_CN_HDON_PHTHU(DataRow dr, string strMatngan, long _Sophieuthu, string strUsername)
        {
            if (this.obj_CN_HDON_PHTHU_Controller == null)
            { this.obj_CN_HDON_PHTHU_Controller = new cls_CN_HDON_PHTHU_Controller(); }
            this.obj_CN_HDON_PHTHU_Controller.pInfor.MA_DVIQLY = dr["MA_DVIQLY"].ToString();
            this.obj_CN_HDON_PHTHU_Controller.pInfor.SO_PHTHU = _Sophieuthu;
            this.obj_CN_HDON_PHTHU_Controller.pInfor.ID_HDON = Convert.ToInt64(dr["ID_HDON"].ToString());
            this.obj_CN_HDON_PHTHU_Controller.pInfor.MA_PTTT = dr["MA_PTTT"].ToString().Trim();
            this.obj_CN_HDON_PHTHU_Controller.pInfor.LOAI_HDON = dr["LOAI_HDON"].ToString();
            this.obj_CN_HDON_PHTHU_Controller.pInfor.MA_TNGAN = strMatngan;
            this.obj_CN_HDON_PHTHU_Controller.pInfor.NGAY_NOP = Convert.ToDateTime(dr["NGAY_NOP"].ToString());
            this.obj_CN_HDON_PHTHU_Controller.pInfor.NGAY_SUA = DateTime.Now;
            this.obj_CN_HDON_PHTHU_Controller.pInfor.NGAY_TAO = DateTime.Now;
            this.obj_CN_HDON_PHTHU_Controller.pInfor.NGUOI_TAO = strUsername;
            this.obj_CN_HDON_PHTHU_Controller.pInfor.NGUOI_SUA = strUsername;
            this.obj_CN_HDON_PHTHU_Controller.pInfor.SO_BBQTOAN = 0;
            this.obj_CN_HDON_PHTHU_Controller.pInfor.TIEN_NOP = Convert.ToDecimal(dr["SO_TIEN"].ToString());
            this.obj_CN_HDON_PHTHU_Controller.pInfor.THUE_NOP = Convert.ToDecimal(dr["TIEN_GTGT"].ToString());
            this.obj_CN_HDON_PHTHU_Controller.pInfor.MA_CNANG = "-3";
        }
        //public void mapinfo_CN_THEODOINO(DataRow dr)
        //{
        //    if (this.obj_CN_THEODOINO_Controller == null)
        //    { this.obj_CN_THEODOINO_Controller = new BCNPCObject.cls_CN_THEODOINO_Controller(); }
        //    this.obj_CN_THEODOINO_Controller.pInfor.MA_DVIQLY = dr["MA_DVIQLY"].ToString();
        //    this.obj_CN_THEODOINO_Controller.pInfor.ID_HDON = Convert.ToInt64(dr["ID_HDON"].ToString());
        //    this.obj_CN_THEODOINO_Controller.pInfor.LOAI_HDON = dr["LOAI_HDON"].ToString();
        //    this.obj_CN_THEODOINO_Controller.pInfor.TIEN_NO = Convert.ToDecimal(dr["TIEN_NO"].ToString()) - Convert.ToDecimal(dr["SO_TIEN"].ToString());
        //    this.obj_CN_THEODOINO_Controller.pInfor.THUE_NO = Convert.ToDecimal(dr["THUE_NO"].ToString()) - Convert.ToDecimal(dr["TIEN_GTGT"].ToString());

        //}
        #endregion

        #region Methos

        #region phần làm của công nợ

        #region Tungdt - báo cáo tồn và báo cáo ATM

        public DataSet CN_So_BBGiao_Nutgoc(string ma_tngan,string ma_dviqly)
        {
            return obj_NPC_CHAMNO_OFFLINE_Controller.CN_So_BBGiao_Nutgoc(ma_tngan,ma_dviqly);
        }

        public DataSet CN_So_BBGiao_Nutcha(string ma_tngan, int so_BBGIAO,string ma_dviqly)
        {
            return obj_NPC_CHAMNO_OFFLINE_Controller.CN_So_BBGiao_Nutcha(ma_tngan, so_BBGIAO,ma_dviqly);
        }

        public DataSet CN_So_BBGiao_Nutcon(string ma_tngan, int so_BBGIAO, string Ma_SoGCS)
        {
            return obj_NPC_CHAMNO_OFFLINE_Controller.CN_So_BBGiao_Nutcon(ma_tngan, so_BBGIAO, Ma_SoGCS);
        }

        public DataSet ATM_Ton_Select(string ma_dvqly)
        {
            return obj_NPC_CHAMNO_OFFLINE_Controller.ATM_Ton_Select(ma_dvqly);
        }

        public DataSet CN_Select(string ma_tngan)
        {
            return obj_NPC_CHAMNO_OFFLINE_Controller.CN_Select(ma_tngan);
        }

        public DataSet ChamnoOff_Nutcha(string ma_tngan, DateTime ngaybd, DateTime ngaykt, int thanght, string ma_dvql)
        {
            return obj_NPC_CHAMNO_OFFLINE_Controller.ChamnoOff_Nutcha(ma_tngan, ngaybd, ngaykt, thanght, ma_dvql);
        }

        public DataSet ChamnoOff_Nutcha2(int bb_giao, string ma_tngan, DateTime ngaybd, DateTime ngaykt, int thanght, string ma_dvql)
        {
            return obj_NPC_CHAMNO_OFFLINE_Controller.ChamnoOff_Nutcha2(bb_giao, ma_tngan, ngaybd, ngaykt, thanght, ma_dvql);
        }

        public DataSet ChamnoOff_Nutcon(string so_gcs, int bb_giao, string ma_tngan, DateTime ngaybd, DateTime ngaykt, int thanght, string ma_dvql)
        {
            return obj_NPC_CHAMNO_OFFLINE_Controller.ChamnoOff_Nutcon(so_gcs, bb_giao, ma_tngan, ngaybd, ngaykt, thanght, ma_dvql);
        }

        public DataSet ChamnoOff_All(DateTime ngaybd, DateTime ngaykt, int thanght, string ma_dvql)
        {
            return obj_NPC_CHAMNO_OFFLINE_Controller.ChamnoOff_All(ngaybd, ngaykt, thanght, ma_dvql);
        }

        public DataSet DS_BBG(string ma_tngan, string ma_dvqly)
        {
            return obj_NPC_CHAMNO_OFFLINE_Controller.DS_BBG(ma_tngan, ma_dvqly);
        }

        public DataSet DS_TNV()
        {
            return obj_NPC_CHAMNO_OFFLINE_Controller.DS_TNV();
        }

        public DataSet DS_SoGCS(int ma_bbg, string ma_tngan)
        {
            return obj_NPC_CHAMNO_OFFLINE_Controller.DS_SoGCS(ma_bbg, ma_tngan);
        }
        #endregion

        public DataSet TONGTIENCHAM(System.String strMaDviqly,System.String strMa_Tngan, int v_Thang, int v_Nam, ref string maloi)
        {
            try
            {
                DataSet ds = new DataSet();
                CMIS2.DB.SELECT_TONGTIENCHAM(strMaDviqly,strMa_Tngan, v_Thang, v_Nam,out ds);
                return ds;
            }
            catch (Exception ex)
            {
                maloi = ex.ToString();
                return null;
            }
            finally
            {
            }
        }
        public void TONGHOPBAOTOANDONVI(System.String strMaDviqly, int v_Thang, int v_Nam, ref string maloi)
        {
            try
            {
                CMIS2.DB.TONGHOPBAOTOANDONVI(strMaDviqly, v_Thang, v_Nam);
                maloi = "true";
            }
            catch (Exception ex)
            {
                maloi = ex.ToString();
            }
            finally
            {
            }
        }
        public DataSet get_INBAOCAOTONGHOPDONVI(System.String strMaDviqly, System.String sma_tngan, string danhsach, DateTime v_tngay, DateTime v_dngay, ref string maloi)
        {
            DataSet ds = new DataSet();
            try
            {
                CMIS2.DB.get_INBAOCAOTONGHOPDONVI(strMaDviqly, sma_tngan, danhsach, v_tngay, v_dngay, out ds);
                return ds;
            }
            catch (Exception ex)
            {
                maloi = ex.ToString();
                return null;
            }
            finally
            {
            }
        }
        public bool check_ATM(string ma_dviqly, Int64 id_hdon)
        {
            if (obj_NPC_CHAMNO_OFFLINE_Controller == null)
            {
                obj_NPC_CHAMNO_OFFLINE_Controller = new cls_NPC_CHAMNO_OFFLINE_Controller();
            }
            return this.obj_NPC_CHAMNO_OFFLINE_Controller.check_ATM(ma_dviqly, id_hdon);
        }
        public DataSet SELECT_HOADON_FILE(System.String strMaDviqly, System.String v_ma_khang, Int64 v_id_hdon,string check, ref string maloi)
        {
            String strErr = "";
            DataSet ds = new DataSet();
            try
            {
                //========     UPDATE BIEU 17  =============
                CMIS2.DB.get_HOADON_FILE(strMaDviqly,v_ma_khang, v_id_hdon,check, out ds);
                return ds;
            }
            catch (Exception ex)
            {
                maloi = ex.ToString();
                return null;
            }
            finally
            {
            }
        }
        public DataSet get_DSLOG(string strMadvi, string ma_khang, Int64 id_hdon, string strMatngan, Int16 ithanght, Int16 inamht, string pNgayChamNo, int tugio, int dengio, int Danhsach, int IN_BC)
        {
            DataSet ds = new DataSet();
            try
            {
                CMIS2.DB.get_DSLOG(strMadvi, strMatngan, ma_khang, pNgayChamNo, id_hdon, ithanght, inamht, tugio, dengio, Danhsach, IN_BC, out ds);
                return ds;
            }
            catch
            { return null; }
        }
        public bool chamno_OFFLINE(DataSet ds, string strUsername, int ithanght, int inamht, ref string maloi)
        {
            try
            {
                long psophieuthu = -1;
                DataRow[] drselect = ds.Tables[0].Select("CHON = True");
                foreach (DataRow dr in drselect)
                {
                    // update trang thai
                    obj_NPC_CHAMNO_OFFLINE_Controller.update_NPC_CHAMNO_OFFLINE_DUYET(dr["MA_DVIQLY"].ToString(), dr["MA_KHANG"].ToString(), Convert.ToInt64(dr["ID_HDON"]), ithanght, inamht, ref maloi);
                    //update tien no cho khach hàng
                    obj_NPC_CHAMNO_OFFLINE_Controller.update_chamno_OFFLINE(dr["MA_DVIQLY"].ToString(), Convert.ToInt64(dr["ID_HDON"]));
                    //Them phieu thu, lay psophieuthu
                    // xóa trước khi insert;
                    obj_CN_PHIEU_THU_Controller.delete_PhieuThu(dr["MA_DVIQLY"].ToString(), dr["MA_KHANG"].ToString(), dr["MA_TNGAN"].ToString(), Convert.ToDecimal(dr["SO_TIEN"]) + Convert.ToDecimal(dr["TIEN_GTGT"]));
                    mapinfo_CN_PHIEU_THU(dr, dr["MA_TNGAN"].ToString(), strUsername);
                    obj_CN_PHIEU_THU_Controller.insert_PhieuThu(ref psophieuthu);

                    obj_CN_HDON_PHTHU_Controller.delete_CN_HDON_PHTHU(dr["MA_DVIQLY"].ToString(), Convert.ToInt64(dr["ID_HDON"]), dr["MA_TNGAN"].ToString(), Convert.ToDecimal(dr["SO_TIEN"]));
                    mapinfo_CN_HDON_PHTHU(dr, dr["MA_TNGAN"].ToString(), psophieuthu, strUsername);
                    obj_CN_HDON_PHTHU_Controller.insert_CN_HDON_PHTHU();
                }
                return true;
            }
            catch(Exception ex) { return false; maloi = ex.ToString();}
        }
        public DataSet Get_KhachHang(string ma_dviqly, string ma_khang, int thanght, int namht, ref string messger, ref string maloi)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = obj_NPC_CHAMNO_OFFLINE_Controller.Get_KhachHang(ma_dviqly, ma_khang,thanght, namht,ref messger, ref maloi);
                return ds;
            }
            catch
            { return null; }
        }
        public DataSet select_HOADON_NHOM(string ma_dviqly, string ma_khang, string ma_tngan)
        {
            String strErr = "";
            DataSet ds = new DataSet();
            try
            {
                CMIS2.DB.SELECT_HOADON_NHOM(ma_dviqly, ma_khang, ma_tngan, out ds);
                return ds;
            }
            catch (Exception ex)
            {
                // maloi = ex.ToString();
                return null;
            }
            finally
            {
            }
        }
        public DataSet select_HOADON_DUYETCHAM(string ma_dviqly, string ma_tngan,DateTime ngaycham)
        {
            String strErr = "";
            DataSet ds = new DataSet();
            try
            {
                CMIS2.DB.SELECT_HOADON_DUYETCHAM(ma_dviqly, ma_tngan, ngaycham, out ds);
                return ds;
            }
            catch (Exception ex)
            {
               // maloi = ex.ToString();
                return null;
            }
            finally
            {
            }
        }
        public void select_THANGNAMCONGNO(string ma_dviqly, ref int thang, ref int nam)
        {
            try
            {
                obj_CN_BB_GTHU_Controller.select_THANGNAMCONGNO(ma_dviqly,ref thang,ref nam);
            }
            catch (Exception ex)
            {
                
            }
        }
        public DataSet select_MATRAM(string ma_dviqly, string ma_khang)
        {
            String strErr = "";
            DataSet ds = new DataSet();
            try
            {
                //========     UPDATE BIEU 17  =============
                obj_CN_BB_GTHU_Controller.select_MATRAM(ma_dviqly, ma_khang);
                return ds;
            }
            catch (Exception ex)
            {
                //maloi = ex.ToString();
                return null;
            }
            finally
            {
            }
        }
        public DataSet SELECT_CN_BBAN_TNGAN(System.String strMaDviqly, System.String v_MaTNgan, Int32 v_Dkien,ref string maloi)
        {
            String strErr = "";
            DataSet ds = new DataSet();
            try
            {
                //========     UPDATE BIEU 17  =============
                CMIS2.DB.SELECT_CN_BBAN_TNGAN(strMaDviqly, v_MaTNgan, v_Dkien, out ds);
                return ds;
            }
            catch (Exception ex)
            {
                maloi = ex.ToString();
                return null; 
            }
            finally
            {
            }
        }
        public DataSet SELECT_CN_HOADON_TNGAN(System.String strMaDviqly, System.String v_MaTNgan, Int32 v_Ban, System.String v_MaSoGCS, System.String v_Hdon, Int32 v_Dkien, ref string maloi)
        {
            String strErr = "";
            DataSet ds = new DataSet();
            try
            {
                //========     UPDATE BIEU 17  =============
                CMIS2.DB.SELECT_CN_HOADON_TNGAN(strMaDviqly, v_MaTNgan,v_Ban,v_MaSoGCS,v_Hdon, v_Dkien, out ds);
                return ds;
            }
            catch (Exception ex)
            {
                maloi = ex.ToString();
                return null;
            }
            finally
            {
            }
        }
        public DataSet select_ThuNganVien(string ma_dviqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = obj_D_TNGAN_VIEN_Controller.select_ThuNganVien(ma_dviqly);
                return ds;
            }
            catch
            { return null; }
        }
        public DataSet select_ThuNganVien_baocao(string ma_dviqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = obj_D_TNGAN_VIEN_Controller.select_ThuNganVien_baocao(ma_dviqly);
                return ds;
            }
            catch
            { return null; }
        }
        public DataSet select_BB_GIAO_THU(string ma_dviqly, string ma_thungan)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = obj_CN_BB_GTHU_Controller.select_BB_GIAO_THU(ma_dviqly,ma_thungan);
                return ds;
            }
            catch
            { return null; }
        }
        public DataSet select_CN_BB_GTHU(string ma_dviqly, string ma_TNV,DataSet dsbb)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = obj_CN_BB_GTHU_Controller.select_CN_BB_GTHU(ma_dviqly, ma_TNV, dsbb);
                return ds;
            }
            catch
            { return null; }
        }
        public DataSet select_HOADON_GIAO_THU(string ma_dviqly, long BBAN_GIAO)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = obj_CN_BB_GTHU_Controller.select_HOADON_GIAO_THU(ma_dviqly, BBAN_GIAO);
                return ds;
            }
            catch
            { return null; }
        }

        public bool insert_NPC_CHAMNO_OFFLINE(DataSet Entity, ref string maloi)
        {
            this.mapEntityToInfoNPC_CHAMNO_OFFLINE(Entity);
            if (obj_NPC_CHAMNO_OFFLINE_Controller == null)
            {
                obj_NPC_CHAMNO_OFFLINE_Controller = new cls_NPC_CHAMNO_OFFLINE_Controller();
            }
            return this.obj_NPC_CHAMNO_OFFLINE_Controller.insert_NPC_CHAMNO_OFFLINE(ref maloi);
        }
        public bool insert_NPC_CHAMNO_OFFLINE_LOG(DataSet Entity, ref string maloi)
        {
            this.mapEntityToInfoNPC_CHAMNO_OFFLINE_LOG(Entity);
            if (obj_NPC_CHAMNO_OFFLINE_LOG_Controller == null)
            {
                obj_NPC_CHAMNO_OFFLINE_LOG_Controller = new cls_NPC_CHAMNO_OFFLINE_LOG_Controller();
            }
            return this.obj_NPC_CHAMNO_OFFLINE_LOG_Controller.insert_NPC_CHAMNO_OFFLINE_LOG(ref maloi);
        }

        public bool delete_NPC_CHAMNO_OFFLINE(string ma_dviqly, string ma_khang, Int64 id_hdon, int thanght, int namht, ref string maloi)
        {
            if (obj_NPC_CHAMNO_OFFLINE_Controller == null)
            {
                obj_NPC_CHAMNO_OFFLINE_Controller = new cls_NPC_CHAMNO_OFFLINE_Controller();
            }
            return this.obj_NPC_CHAMNO_OFFLINE_Controller.delete_NPC_CHAMNO_OFFLINE(ma_dviqly,ma_khang,id_hdon,thanght,namht,ref maloi);
        }
        public bool update_NPC_CHAMNO_OFFLINE_XOA(string ma_dviqly, string ma_tngan, int thanght, int namht, DateTime? ngaynop, int trangthaixoa, int trangthaimax, ref string maloi)
        {
            if (obj_NPC_CHAMNO_OFFLINE_Controller == null)
            {
                obj_NPC_CHAMNO_OFFLINE_Controller = new cls_NPC_CHAMNO_OFFLINE_Controller();
            }
            return this.obj_NPC_CHAMNO_OFFLINE_Controller.update_NPC_CHAMNO_OFFLINE_XOA(ma_dviqly, ma_tngan, thanght, namht, ngaynop,trangthaixoa,trangthaimax, ref maloi);
        }
        public bool update_NPC_CHAMNO_OFFLINE_NHOM(string ma_dviqly, string ma_khang, Int64 id_hdon, int thanght, int namht,Int64 nhom, ref string maloi)
        {
            if (obj_NPC_CHAMNO_OFFLINE_Controller == null)
            {
                obj_NPC_CHAMNO_OFFLINE_Controller = new cls_NPC_CHAMNO_OFFLINE_Controller();
            }
            return this.obj_NPC_CHAMNO_OFFLINE_Controller.update_NPC_CHAMNO_OFFLINE_NHOM(ma_dviqly, ma_khang, id_hdon, thanght, namht,nhom, ref maloi);
        }
        public bool update_NPC_CHAMNO_OFFLINE_IN(string ma_dviqly, string ma_tngan, int thanght, int namht, DateTime? ngaynop, DateTime gionop, ref int trangthai, ref string maloi)
        {
            if (obj_NPC_CHAMNO_OFFLINE_Controller == null)
            {
                obj_NPC_CHAMNO_OFFLINE_Controller = new cls_NPC_CHAMNO_OFFLINE_Controller();
            }
            return this.obj_NPC_CHAMNO_OFFLINE_Controller.update_NPC_CHAMNO_OFFLINE_IN(ma_dviqly, ma_tngan, thanght, namht, ngaynop, gionop, ref trangthai, ref maloi);
        }
        public DataSet select_lannoptien(string ma_dviqly, string ma_tngan, int thanght, int namht, DateTime? ngaynop, ref string maloi)
        {
            try
            {

                return obj_NPC_CHAMNO_OFFLINE_Controller.select_lannoptien(ma_dviqly, ma_tngan, thanght, namht, ngaynop, ref maloi);
            }
            catch
            { return null; }
        }
        #endregion
        public bool checkdonvidiachinh(string ma_dviqly, string ma_diachinh)
        {
            if (obj_DV_YCAU_KNAI_Controller == null)
            {
                obj_DV_YCAU_KNAI_Controller = new cls_DV_YCAU_KNAI_Controller();
            }
            return this.obj_DV_YCAU_KNAI_Controller.checkdonvidiachinh(ma_dviqly, ma_diachinh);
        }
        public bool checktram(string ma_dviqly, string ma_tram)
        {
            if (obj_DV_YCAU_KNAI_Controller == null)
            {
                obj_DV_YCAU_KNAI_Controller = new cls_DV_YCAU_KNAI_Controller();
            }
            return this.obj_DV_YCAU_KNAI_Controller.checktram(ma_dviqly, ma_tram);
        }
        public bool check_sogcs(string ma_dviqly, string so_gcs, int thang, int nam)
        {
            if (obj_HDG_DDO_SOGCS_Controller == null)
            {
                obj_HDG_DDO_SOGCS_Controller = new cls_HDG_DDO_SOGCS_Controller();
            }
            return this.obj_HDG_DDO_SOGCS_Controller.check_sogcs(ma_dviqly, so_gcs, thang, nam);
        }
        public DataSet check_cto(string ma_dviqly, string so_cto, string ma_loai, string nam_sx)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = obj_DD_BCS_CTO_Controller.check_cto(ma_dviqly,  so_cto,  ma_loai,  nam_sx);
                return ds;
            }
            catch
            { return null; }
        }
        public DataSet select_MATUSINH(string ma_dviqly, string kieu_ma)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = obj_DV_YCAU_KNAI_Controller.select_MATUSINH(ma_dviqly, kieu_ma);
                return ds;
            }
            catch
            { return null; }
        }
        public int ID_DVI_DCHINH(string ma_dviqly)
        {
            if (obj_HDG_DIEM_DO_Controller == null)
            {
                obj_HDG_DIEM_DO_Controller = new cls_HDG_DIEM_DO_Controller();
            }
            return this.obj_HDG_DIEM_DO_Controller.ID_DVI_DCHINH(ma_dviqly);
        }
        public bool update_MATUSINH(string MA_DVIQLY, Int64 ID_HDG_MATUSINH, long ma_tu_sinh)
        {
            if (obj_DV_YCAU_KNAI_Controller == null)
            {
                obj_DV_YCAU_KNAI_Controller = new cls_DV_YCAU_KNAI_Controller();
            }
            return this.obj_DV_YCAU_KNAI_Controller.update_MATUSINH(MA_DVIQLY, ID_HDG_MATUSINH, ma_tu_sinh);
        }
        public bool update_hoso_cto(string ma_dviqly, string ma_cto, DateTime ngay_bdong)
        {
            if (obj_DD_BBAN_BDONG_Controller == null)
            {
                obj_DD_BBAN_BDONG_Controller = new cls_DD_BBAN_BDONG_Controller();
            }
            return this.obj_DD_BBAN_BDONG_Controller.update_hoso_cto(ma_dviqly, ma_cto, ngay_bdong);
        }
        public bool update_DD_HOSO_CTO(DataSet ds, ref string maloi)
        {
            if (obj_DD_BBAN_BDONG_Controller == null)
            {
                obj_DD_BBAN_BDONG_Controller = new cls_DD_BBAN_BDONG_Controller();
            }
            return this.obj_DD_BBAN_BDONG_Controller.update_DD_HOSO_CTO(ds.Tables["DD_HOSO_CTO"], ref maloi);
        }
        public bool insert_DV_YCAU_KNAI(DataSet Entity,ref long id_MaYeuCau, ref string maloi)
        {
            this.mapEntityToInfoDV_YCAU_KNAI(Entity);
            if (obj_DV_YCAU_KNAI_Controller == null)
            {
                obj_DV_YCAU_KNAI_Controller = new cls_DV_YCAU_KNAI_Controller();
            }
            return this.obj_DV_YCAU_KNAI_Controller.insert_DV_YCAU_KNAI(ref id_MaYeuCau,ref maloi);
        }
        public bool insert_HDG_HOP_DONG(DataSet Entity, ref Int64 in_HDG_HOP_DONG, ref string maloi)
        {
            this.mapEntityToInfoHDG_HOP_DONG(Entity);
            if (obj_HDG_HOP_DONG_Controller == null)
            {
                obj_HDG_HOP_DONG_Controller = new cls_HDG_HOP_DONG_Controller();
            }
            return this.obj_HDG_HOP_DONG_Controller.insert_HDG_HOP_DONG(ref in_HDG_HOP_DONG, ref maloi);
        }
        public bool insert_HDG_KHACH_HANG(DataSet Entity, ref string maloi)
        {
            this.mapEntityToInfoHDG_KHACH_HANG(Entity);
            if (obj_HDG_KHACH_HANG_Controller == null)
            {
                obj_HDG_KHACH_HANG_Controller = new cls_HDG_KHACH_HANG_Controller();
            }
            return this.obj_HDG_KHACH_HANG_Controller.insert_HDG_KHACH_HANG(ref maloi);
        }
        public bool insert_HDG_DIEM_DO(DataSet Entity, ref string maloi)
        {
            this.mapEntityToInfoHDG_DIEM_DO(Entity);
            if (obj_HDG_DIEM_DO_Controller == null)
            {
                obj_HDG_DIEM_DO_Controller = new cls_HDG_DIEM_DO_Controller();
            }
            return this.obj_HDG_DIEM_DO_Controller.insert_HDG_DIEM_DO(ref maloi);
        }
        public bool insert_HDG_VITRI_DDO(DataSet Entity, ref Int64 id_vitri_ddo, ref string maloi)
        {
            this.mapEntityToInfoHDG_VITRI_DDO(Entity);
            if (obj_HDG_VITRI_DDO_Controller == null)
            {
                obj_HDG_VITRI_DDO_Controller = new cls_HDG_VITRI_DDO_Controller();
            }
            return this.obj_HDG_VITRI_DDO_Controller.insert_HDG_VITRI_DDO(ref id_vitri_ddo,ref maloi);
        }
        public bool insert_HDG_PTHUC_TTOAN(DataSet Entity, ref Int64 id_pthuc_ttoan, ref string maloi)
        {
            this.mapEntityToInfoHDG_PTHUC_TTOAN(Entity);
            if (obj_HDG_PTHUC_TTOAN_Controller == null)
            {
                obj_HDG_PTHUC_TTOAN_Controller = new cls_HDG_PTHUC_TTOAN_Controller();
            }
            return this.obj_HDG_PTHUC_TTOAN_Controller.insert_HDG_PTHUC_TTOAN(ref id_pthuc_ttoan,ref maloi);
        }
        public bool insert_HDG_KHANG_LIENHE(DataSet Entity,ref Int64 id_lienhe, ref string maloi)
        {
            this.mapEntityToInfoHDG_KHANG_LIENHE(Entity);
            if (obj_HDG_KHANG_LIENHE_Controller == null)
            {
                obj_HDG_KHANG_LIENHE_Controller = new cls_HDG_KHANG_LIENHE_Controller();
            }
            return this.obj_HDG_KHANG_LIENHE_Controller.insert_HDG_KHANG_LIENHE(ref id_lienhe,ref maloi);
        }
        public bool insert_HDG_HO_NGHEO(DataSet Entity, ref Int64 id_hongheo, ref string maloi)
        {
            this.mapEntityToInfoHDG_HO_NGHEO(Entity);
            if (obj_HDG_HO_NGHEO_Controller == null)
            {
                obj_HDG_HO_NGHEO_Controller = new cls_HDG_HO_NGHEO_Controller();
            }
            return this.obj_HDG_HO_NGHEO_Controller.insert_HDG_HO_NGHEO(ref id_hongheo, ref maloi);
        }
        public bool insert_HDG_DDO_SOGCS(DataSet Entity,ref Int64 id_qhe, ref string maloi)
        {
            this.mapEntityToInfoHDG_DDO_SOGCS(Entity);
            if (obj_HDG_DDO_SOGCS_Controller == null)
            {
                obj_HDG_DDO_SOGCS_Controller = new cls_HDG_DDO_SOGCS_Controller();
            }
            return this.obj_HDG_DDO_SOGCS_Controller.insert_HDG_DDO_SOGCS(ref id_qhe,ref maloi);
        }
        public bool insert_DD_BBAN_BDONG(DataSet Entity,ref Int64 id_bb, ref string maloi)
        {
            this.mapEntityToInfoDD_BBAN_BDONG(Entity);
            if (obj_DD_BBAN_BDONG_Controller == null)
            {
                obj_DD_BBAN_BDONG_Controller = new cls_DD_BBAN_BDONG_Controller();
            }
            return this.obj_DD_BBAN_BDONG_Controller.insert_DD_BBAN_BDONG(ref id_bb,ref maloi);
        }
        public bool insert_DD_BCS_CTO(DataSet Entity,ref Int64 id_bcs, ref string maloi)
        {
            this.mapEntityToInfoDD_BCS_CTO(Entity);
            if (obj_DD_BCS_CTO_Controller == null)
            {
                obj_DD_BCS_CTO_Controller = new cls_DD_BCS_CTO_Controller();
            }
            return this.obj_DD_BCS_CTO_Controller.insert_DD_BCS_CTO(ref id_bcs,ref maloi);
        }
        public bool insert_DD_BDONG_CTO(DataSet Entity, ref string maloi)
        {
            this.mapEntityToInfoDD_BDONG_CTO(Entity);
            if (obj_DD_BDONG_CTO_Controller == null)
            {
                obj_DD_BDONG_CTO_Controller = new cls_DD_BDONG_CTO_Controller();
            }
            return this.obj_DD_BDONG_CTO_Controller.insert_DD_BDONG_CTO(ref maloi);
        }
        public bool insert_DD_BDONG_HTAI(DataSet Entity, ref string maloi)
        {
            this.mapEntityToInfoDD_BDONG_HTAI(Entity);
            if (obj_DD_BDONG_HTAI_Controller == null)
            {
                obj_DD_BDONG_HTAI_Controller = new cls_DD_BDONG_HTAI_Controller();
            }
            return this.obj_DD_BDONG_HTAI_Controller.insert_DD_BDONG_HTAI(ref maloi);
        }
        public bool insert_GCS_CHISO(DataSet Entity,ref Int64 id_chiso, ref string maloi)
        {
            this.mapEntityToInfoGCS_CHISO(Entity);
            if (obj_GCS_CHISO_Controller == null)
            {
                obj_GCS_CHISO_Controller = new cls_GCS_CHISO_Controller();
            }
            return this.obj_GCS_CHISO_Controller.insert_GCS_CHISO(ref id_chiso,ref maloi);
        }
        public bool insert_HDG_BBAN_APGIA(DataSet Entity,ref Int64 id_bbanagia, ref string maloi)
        {
            this.mapEntityToInfoHDG_BBAN_APGIA(Entity);
            if (obj_HDG_BBAN_APGIA_Controller == null)
            {
                obj_HDG_BBAN_APGIA_Controller = new cls_HDG_BBAN_APGIA_Controller();
            }
            return this.obj_HDG_BBAN_APGIA_Controller.insert_HDG_BBAN_APGIA(ref id_bbanagia,ref maloi);
        }
        public bool insert_HDG_PHU_LUC_HD(DataSet Entity, ref Int64 id_phuluchdong, ref string maloi)
        {
            this.mapEntityToInfoHDG_PHU_LUC_HD(Entity);
            if (obj_HDG_PHU_LUC_HD_Controller == null)
            {
                obj_HDG_PHU_LUC_HD_Controller = new cls_HDG_PHU_LUC_HD_Controller();
            }
            return this.obj_HDG_PHU_LUC_HD_Controller.insert_HDG_PHU_LUC_HD(ref id_phuluchdong,ref maloi);
        }
        public bool insert_DD_BDONG_TTHAO(DataSet Entity, ref Int64 id_ls_treothao, ref string maloi)
        {
            this.mapEntityToInfoDD_BDONG_TTHAO(Entity);
            if (obj_DD_BDONG_TTHAO_Controller == null)
            {
                obj_DD_BDONG_TTHAO_Controller = new cls_DD_BDONG_TTHAO_Controller();
            }
            return this.obj_DD_BDONG_TTHAO_Controller.insert_DD_BDONG_TTHAO(ref id_ls_treothao,ref maloi);
        }
        public bool delete_DV_YCAU_KNAI(DataSet ds, ref string maloi)
        {
            if (obj_DV_YCAU_KNAI_Controller == null)
            {
                obj_DV_YCAU_KNAI_Controller = new cls_DV_YCAU_KNAI_Controller();
            }
            return this.obj_DV_YCAU_KNAI_Controller.delete_DV_YCAU_KNAI(ds.Tables["DV_YCAU_KNAI"], ref maloi);
        }
        public bool delete_HDG_HOP_DONG(DataSet ds, ref string maloi)
        {
            if (obj_HDG_HOP_DONG_Controller == null)
            {
                obj_HDG_HOP_DONG_Controller = new cls_HDG_HOP_DONG_Controller();
            }
            return this.obj_HDG_HOP_DONG_Controller.delete_HDG_HOP_DONG(ds.Tables["HDG_HOP_DONG"], ref maloi);
        }
        public bool delete_HDG_KHACH_HANG(DataSet ds, ref string maloi)
        {
            if (obj_HDG_KHACH_HANG_Controller == null)
            {
                obj_HDG_KHACH_HANG_Controller = new cls_HDG_KHACH_HANG_Controller();
            }
            return this.obj_HDG_KHACH_HANG_Controller.delete_HDG_KHACH_HANG(ds.Tables["HDG_KHACH_HANG"], ref maloi);
        }
        public bool delete_HDG_DIEM_DO(DataSet ds, ref string maloi)
        {
            if (obj_HDG_DIEM_DO_Controller == null)
            {
                obj_HDG_DIEM_DO_Controller = new cls_HDG_DIEM_DO_Controller();
            }
            return this.obj_HDG_DIEM_DO_Controller.delete_HDG_DIEM_DO(ds.Tables["HDG_DIEM_DO"], ref maloi);
        }
        public bool delete_HDG_VITRI_DDO(DataSet ds, ref string maloi)
        {
            if (obj_HDG_VITRI_DDO_Controller == null)
            {
                obj_HDG_VITRI_DDO_Controller = new cls_HDG_VITRI_DDO_Controller();
            }
            return this.obj_HDG_VITRI_DDO_Controller.delete_HDG_VITRI_DDO(ds.Tables["HDG_VITRI_DDO"], ref maloi);
        }
        public bool delete_HDG_PTHUC_TTOAN(DataSet ds, ref string maloi)
        {
            if (obj_HDG_PTHUC_TTOAN_Controller == null)
            {
                obj_HDG_PTHUC_TTOAN_Controller = new cls_HDG_PTHUC_TTOAN_Controller();
            }
            return this.obj_HDG_PTHUC_TTOAN_Controller.delete_HDG_PTHUC_TTOAN(ds.Tables["HDG_PTHUC_TTOAN"], ref maloi);
        }
        public bool delete_HDG_KHANG_LIENHE(DataSet ds, ref string maloi)
        {
            if (obj_HDG_KHANG_LIENHE_Controller == null)
            {
                obj_HDG_KHANG_LIENHE_Controller = new cls_HDG_KHANG_LIENHE_Controller();
            }
            return this.obj_HDG_KHANG_LIENHE_Controller.delete_HDG_KHANG_LIENHE(ds.Tables["HDG_KHANG_LIENHE"], ref maloi);
        }
        public bool delete_HDG_HO_NGHEO(DataSet ds, ref string maloi)
        {
            if (obj_HDG_HO_NGHEO_Controller == null)
            {
                obj_HDG_HO_NGHEO_Controller = new cls_HDG_HO_NGHEO_Controller();
            }
            return this.obj_HDG_HO_NGHEO_Controller.delete_HDG_HO_NGHEO(ds.Tables["HDG_HO_NGHEO"], ref maloi);
        }
        public bool delete_HDG_DDO_SOGCS(DataSet ds, ref string maloi)
        {
            if (obj_HDG_DDO_SOGCS_Controller == null)
            {
                obj_HDG_DDO_SOGCS_Controller = new cls_HDG_DDO_SOGCS_Controller();
            }
            return this.obj_HDG_DDO_SOGCS_Controller.delete_HDG_DDO_SOGCS(ds.Tables["HDG_DDO_SOGCS"], ref maloi);
        }
        public bool delete_DD_BBAN_BDONG(DataSet ds, ref string maloi)
        {
            if (obj_DD_BBAN_BDONG_Controller == null)
            {
                obj_DD_BBAN_BDONG_Controller = new cls_DD_BBAN_BDONG_Controller();
            }
            return this.obj_DD_BBAN_BDONG_Controller.delete_DD_BBAN_BDONG(ds.Tables["DD_BBAN_BDONG"], ref maloi);
        }
        public bool delete_DD_BCS_CTO(DataSet ds, ref string maloi)
        {
            if (obj_DD_BCS_CTO_Controller == null)
            {
                obj_DD_BCS_CTO_Controller = new cls_DD_BCS_CTO_Controller();
            }
            return this.obj_DD_BCS_CTO_Controller.delete_DD_BCS_CTO(ds.Tables["DD_BCS_CTO"], ref maloi);
        }
        public bool delete_DD_BDONG_CTO(DataSet ds, ref string maloi)
        {
            if (obj_DD_BDONG_CTO_Controller == null)
            {
                obj_DD_BDONG_CTO_Controller = new cls_DD_BDONG_CTO_Controller();
            }
            return this.obj_DD_BDONG_CTO_Controller.delete_DD_BDONG_CTO(ds.Tables["DD_BDONG_CTO"], ref maloi);
        }
        public bool delete_DD_BDONG_HTAI(DataSet ds, ref string maloi)
        {
            if (obj_DD_BDONG_HTAI_Controller == null)
            {
                obj_DD_BDONG_HTAI_Controller = new cls_DD_BDONG_HTAI_Controller();
            }
            return this.obj_DD_BDONG_HTAI_Controller.delete_DD_BDONG_HTAI(ds.Tables["DD_BDONG_HTAI"], ref maloi);
        }
        public bool delete_GCS_CHISO(DataSet ds, ref string maloi)
        {
            if (obj_GCS_CHISO_Controller == null)
            {
                obj_GCS_CHISO_Controller = new cls_GCS_CHISO_Controller();
            }
            return this.obj_GCS_CHISO_Controller.delete_GCS_CHISO(ds.Tables["GCS_CHISO"], ref maloi);
        }
        public bool delete_HDG_BBAN_APGIA(DataSet ds, ref string maloi)
        {
            if (obj_HDG_BBAN_APGIA_Controller == null)
            {
                obj_HDG_BBAN_APGIA_Controller = new cls_HDG_BBAN_APGIA_Controller();
            }
            return this.obj_HDG_BBAN_APGIA_Controller.delete_HDG_BBAN_APGIA(ds.Tables["HDG_BBAN_APGIA"], ref maloi);
        }
        public bool delete_HDG_PHU_LUC_HD(DataSet ds, ref string maloi)
        {
            if (obj_HDG_PHU_LUC_HD_Controller == null)
            {
                obj_HDG_PHU_LUC_HD_Controller = new cls_HDG_PHU_LUC_HD_Controller();
            }
            return this.obj_HDG_PHU_LUC_HD_Controller.delete_HDG_PHU_LUC_HD(ds.Tables["HDG_PHU_LUC_HD"], ref maloi);
        }
        public bool delete_DD_BDONG_TTHAO(DataSet ds, ref string maloi)
        {
            if (obj_DD_BDONG_TTHAO_Controller == null)
            {
                obj_DD_BDONG_TTHAO_Controller = new cls_DD_BDONG_TTHAO_Controller();
            }
            return this.obj_DD_BDONG_TTHAO_Controller.delete_DD_BDONG_TTHAO(ds.Tables["DD_BDONG_TTHAO"], ref maloi);
        }
        #endregion
    }
}
